3
0
Fork 0
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:
Lily Bergonzat 2024-05-12 21:34:17 +02:00
parent 893a77d562
commit 1f0c7a4349
170 changed files with 396 additions and 453 deletions

View file

@ -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({

View file

@ -1,5 +1,4 @@
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { CommonPlugin } from "../../Common/CommonPlugin";
import { getChannelInfoEmbed } from "../functions/getChannelInfoEmbed";
import { utilityCmd } from "../types";

View file

@ -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();

View file

@ -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({

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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;

View file

@ -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";

View file

@ -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({

View file

@ -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({

View file

@ -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";

View file

@ -1,5 +1,4 @@
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { CommonPlugin } from "../../Common/CommonPlugin";
import { getServerInfoEmbed } from "../functions/getServerInfoEmbed";
import { utilityCmd } from "../types";

View file

@ -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({

View file

@ -1,5 +1,4 @@
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { CommonPlugin } from "../../Common/CommonPlugin";
import { getUserInfoEmbed } from "../functions/getUserInfoEmbed";
import { utilityCmd } from "../types";

View file

@ -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}**`,
);
},
});

View file

@ -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;
}