mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-08 03:27:20 +00:00
Ran prettier to fix style issues
This commit is contained in:
parent
893a77d562
commit
1f0c7a4349
170 changed files with 396 additions and 453 deletions
|
@ -1,7 +1,6 @@
|
|||
import { APIEmbed, ImageFormat } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { UnknownUser, renderUsername } from "../../../utils";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const AvatarCmd = utilityCmd({
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { getChannelInfoEmbed } from "../functions/getChannelInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import { humanizeDurationShort } from "../../../humanizeDurationShort";
|
|||
import { getBaseUrl } from "../../../pluginUtils";
|
||||
import { ModActionsPlugin } from "../../../plugins/ModActions/ModActionsPlugin";
|
||||
import { DAYS, SECONDS, chunkArray, getInviteCodesInString, noop } from "../../../utils";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { UtilityPluginType, utilityCmd } from "../types";
|
||||
|
||||
|
@ -94,7 +93,12 @@ export async function cleanCmd(pluginData: GuildPluginData<UtilityPluginType>, a
|
|||
|
||||
const targetChannel = args.channel ? pluginData.guild.channels.cache.get(args.channel as Snowflake) : msg.channel;
|
||||
if (!targetChannel?.isTextBased()) {
|
||||
void pluginData.state.common.sendErrorMessage(msg, `Invalid channel specified`, undefined, args["response-interaction"]);
|
||||
void pluginData.state.common.sendErrorMessage(
|
||||
msg,
|
||||
`Invalid channel specified`,
|
||||
undefined,
|
||||
args["response-interaction"],
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -217,10 +221,20 @@ export async function cleanCmd(pluginData: GuildPluginData<UtilityPluginType>, a
|
|||
}
|
||||
}
|
||||
|
||||
responseMsg = await pluginData.state.common.sendSuccessMessage(msg, responseText, undefined, args["response-interaction"]);
|
||||
responseMsg = await pluginData.state.common.sendSuccessMessage(
|
||||
msg,
|
||||
responseText,
|
||||
undefined,
|
||||
args["response-interaction"],
|
||||
);
|
||||
} else {
|
||||
const responseText = `Found no messages to clean${note ? ` (${note})` : ""}!`;
|
||||
responseMsg = await pluginData.state.common.sendErrorMessage(msg, responseText, undefined, args["response-interaction"]);
|
||||
responseMsg = await pluginData.state.common.sendErrorMessage(
|
||||
msg,
|
||||
responseText,
|
||||
undefined,
|
||||
args["response-interaction"],
|
||||
);
|
||||
}
|
||||
|
||||
cleaningMessage?.delete();
|
||||
|
|
|
@ -2,7 +2,6 @@ import { Snowflake, TextChannel } from "discord.js";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { messageLink } from "../../../utils";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const ContextCmd = utilityCmd({
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { getCustomEmojiId } from "../functions/getCustomEmojiId";
|
||||
import { getEmojiInfoEmbed } from "../functions/getEmojiInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
|
|
|
@ -4,7 +4,6 @@ import { commandTypeHelpers as ct } from "../../../commandTypes";
|
|||
import { isValidSnowflake, noop, parseInviteCodeInput, resolveInvite, resolveUser } from "../../../utils";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { resolveMessageTarget } from "../../../utils/resolveMessageTarget";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { getChannelInfoEmbed } from "../functions/getChannelInfoEmbed";
|
||||
import { getCustomEmojiId } from "../functions/getCustomEmojiId";
|
||||
import { getEmojiInfoEmbed } from "../functions/getEmojiInfoEmbed";
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { parseInviteCodeInput } from "../../../utils";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { getInviteInfoEmbed } from "../functions/getInviteInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import fs from "fs";
|
|||
import twemoji from "twemoji";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { downloadFile, isEmoji, SECONDS } from "../../../utils";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
const fsp = fs.promises;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { getMessageInfoEmbed } from "../functions/getMessageInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ import { escapeBold } from "discord.js";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canActOn } from "../../../pluginUtils";
|
||||
import { errorMessage } from "../../../utils";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const NicknameCmd = utilityCmd({
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canActOn } from "../../../pluginUtils";
|
||||
import { errorMessage } from "../../../utils";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const NicknameResetCmd = utilityCmd({
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { Role } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { chunkArray, sorter, trimLines } from "../../../utils";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { refreshMembersIfNeeded } from "../refreshMembers";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { getServerInfoEmbed } from "../functions/getServerInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ import moment from "moment-timezone";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { getBaseUrl } from "../../../pluginUtils";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const SourceCmd = utilityCmd({
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { getUserInfoEmbed } from "../functions/getUserInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ import { VoiceChannel } from "discord.js";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canActOn } from "../../../pluginUtils";
|
||||
import { renderUsername } from "../../../utils";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
@ -43,7 +42,7 @@ export const VcdisconnectCmd = utilityCmd({
|
|||
|
||||
pluginData.state.common.sendSuccessMessage(
|
||||
msg,
|
||||
`**${renderUsername(args.member)}** disconnected from **${channel.name}**`
|
||||
`**${renderUsername(args.member)}** disconnected from **${channel.name}**`,
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
|
@ -2,7 +2,6 @@ import { ChannelType, Snowflake, VoiceChannel } from "discord.js";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canActOn } from "../../../pluginUtils";
|
||||
import { channelMentionRegex, isSnowflake, renderUsername, simpleClosestStringMatch } from "../../../utils";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
@ -81,7 +80,10 @@ export const VcmoveCmd = utilityCmd({
|
|||
newChannel: channel,
|
||||
});
|
||||
|
||||
void pluginData.state.common.sendSuccessMessage(msg, `**${renderUsername(args.member)}** moved to **${channel.name}**`);
|
||||
void pluginData.state.common.sendSuccessMessage(
|
||||
msg,
|
||||
`**${renderUsername(args.member)}** moved to **${channel.name}**`,
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -168,7 +170,10 @@ export const VcmoveAllCmd = utilityCmd({
|
|||
void pluginData.state.common.sendErrorMessage(msg, "Unknown error when trying to move members");
|
||||
return;
|
||||
}
|
||||
void pluginData.state.common.sendErrorMessage(msg, `Failed to move ${renderUsername(currMember)} (${currMember.id})`);
|
||||
void pluginData.state.common.sendErrorMessage(
|
||||
msg,
|
||||
`Failed to move ${renderUsername(currMember)} (${currMember.id})`,
|
||||
);
|
||||
errAmt++;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue