chore: run prettier
This commit is contained in:
parent
77ab2718e7
commit
873bf7eb99
54 changed files with 462 additions and 416 deletions
|
@ -79,11 +79,7 @@ export const InfoCmd = utilityCmd({
|
|||
const messageTarget = await resolveMessageTarget(pluginData, value);
|
||||
if (messageTarget) {
|
||||
if (canReadChannel(messageTarget.channel, message.member)) {
|
||||
const embed = await getMessageInfoEmbed(
|
||||
pluginData,
|
||||
messageTarget.channel.id,
|
||||
messageTarget.messageId,
|
||||
);
|
||||
const embed = await getMessageInfoEmbed(pluginData, messageTarget.channel.id, messageTarget.messageId);
|
||||
if (embed) {
|
||||
message.channel.send({ embeds: [embed] });
|
||||
return;
|
||||
|
|
|
@ -20,11 +20,7 @@ export const MessageInfoCmd = utilityCmd({
|
|||
return;
|
||||
}
|
||||
|
||||
const embed = await getMessageInfoEmbed(
|
||||
pluginData,
|
||||
args.message.channel.id,
|
||||
args.message.messageId,
|
||||
);
|
||||
const embed = await getMessageInfoEmbed(pluginData, args.message.channel.id, args.message.messageId);
|
||||
if (!embed) {
|
||||
sendErrorMessage(pluginData, message.channel, "Unknown message");
|
||||
return;
|
||||
|
|
|
@ -6,10 +6,7 @@ import { UtilityPluginType } from "../types";
|
|||
|
||||
const MENTION_ICON = "https://cdn.discordapp.com/attachments/705009450855039042/839284872152481792/mention.png";
|
||||
|
||||
export async function getRoleInfoEmbed(
|
||||
pluginData: GuildPluginData<UtilityPluginType>,
|
||||
role: Role,
|
||||
): Promise<APIEmbed> {
|
||||
export async function getRoleInfoEmbed(pluginData: GuildPluginData<UtilityPluginType>, role: Role): Promise<APIEmbed> {
|
||||
const embed: EmbedWith<"fields" | "author" | "color"> = {
|
||||
fields: [],
|
||||
author: {
|
||||
|
|
|
@ -4,10 +4,7 @@ import { snowflakeToTimestamp } from "../../../utils/snowflakeToTimestamp";
|
|||
|
||||
const SNOWFLAKE_ICON = "https://cdn.discordapp.com/attachments/740650744830623756/742020790471491668/snowflake.png";
|
||||
|
||||
export async function getSnowflakeInfoEmbed(
|
||||
snowflake: string,
|
||||
showUnknownWarning = false,
|
||||
): Promise<APIEmbed> {
|
||||
export async function getSnowflakeInfoEmbed(snowflake: string, showUnknownWarning = false): Promise<APIEmbed> {
|
||||
const embed: EmbedWith<"fields" | "author"> = {
|
||||
fields: [],
|
||||
author: {
|
||||
|
|
|
@ -14,7 +14,15 @@ import { ArgsFromSignatureOrArray, GuildPluginData } from "knub";
|
|||
import moment from "moment-timezone";
|
||||
import { RegExpRunner, allowTimeout } from "../../RegExpRunner";
|
||||
import { getBaseUrl, sendErrorMessage } from "../../pluginUtils";
|
||||
import { InvalidRegexError, MINUTES, inputPatternToRegExp, multiSorter, renderUserUsername, sorter, trimLines } from "../../utils";
|
||||
import {
|
||||
InvalidRegexError,
|
||||
MINUTES,
|
||||
inputPatternToRegExp,
|
||||
multiSorter,
|
||||
renderUserUsername,
|
||||
sorter,
|
||||
trimLines,
|
||||
} from "../../utils";
|
||||
import { asyncFilter } from "../../utils/async";
|
||||
import { hasDiscordPermissions } from "../../utils/hasDiscordPermissions";
|
||||
import { banSearchSignature } from "./commands/BanSearchCmd";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue