3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-07 19:17:19 +00:00

chore: format

This commit is contained in:
Dragory 2025-05-31 18:19:26 +00:00
parent 6c55b98eee
commit aaf4e02c5f
No known key found for this signature in database
56 changed files with 282 additions and 255 deletions

View file

@ -1,9 +1,4 @@
import {
Attachment,
MessageMentionOptions,
SendableChannels,
TextBasedChannel
} from "discord.js";
import { Attachment, MessageMentionOptions, SendableChannels, TextBasedChannel } from "discord.js";
import { guildPlugin } from "knub";
import { GenericCommandSource, sendContextResponse } from "../../pluginUtils.js";
import { errorMessage, successMessage } from "../../utils.js";
@ -28,9 +23,7 @@ export const CommonPlugin = guildPlugin<CommonPluginType>()({
) => {
const emoji = getSuccessEmoji(pluginData);
const formattedBody = successMessage(body, emoji);
const content = allowedMentions
? { content: formattedBody, allowedMentions }
: { content: formattedBody };
const content = allowedMentions ? { content: formattedBody, allowedMentions } : { content: formattedBody };
if ("isSendable" in context) {
return context.send(content);
}
@ -46,9 +39,7 @@ export const CommonPlugin = guildPlugin<CommonPluginType>()({
) => {
const emoji = getErrorEmoji(pluginData);
const formattedBody = errorMessage(body, emoji);
const content = allowedMentions
? { content: formattedBody, allowedMentions }
: { content: formattedBody };
const content = allowedMentions ? { content: formattedBody, allowedMentions } : { content: formattedBody };
if ("isSendable" in context) {
return context.send(content);
}
@ -67,9 +58,7 @@ export const CommonPlugin = guildPlugin<CommonPluginType>()({
);
}
if (!channel.isSendable()) {
throw new Error(
"Passed attachment storage channel is not sendable",
);
throw new Error("Passed attachment storage channel is not sendable");
}
return channel.send({