diff options
Diffstat (limited to 'src/commands/moderation')
23 files changed, 76 insertions, 135 deletions
diff --git a/src/commands/moderation/_activePunishments.ts b/src/commands/moderation/_activePunishments.ts index 4ded902..140e540 100644 --- a/src/commands/moderation/_activePunishments.ts +++ b/src/commands/moderation/_activePunishments.ts @@ -47,8 +47,8 @@ // slash: true, // channel: 'guild', // hidden: true, -// clientPermissions: (m) => clientSendAndPermCheck(m), -// userPermissions: (m) => userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages]) +// clientPermissions: [], +// userPermissions: ['ManageMessages'] // }); // } diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts index fdb8033..aee8805 100644 --- a/src/commands/moderation/ban.ts +++ b/src/commands/moderation/ban.ts @@ -14,7 +14,7 @@ import { type SlashMessage } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, PermissionFlagsBits, type User } from 'discord.js'; +import { ApplicationCommandOptionType, type User } from 'discord.js'; export default class BanCommand extends BotCommand { public constructor() { @@ -70,8 +70,8 @@ export default class BanCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: [PermissionFlagsBits.BanMembers], - userPermissions: [PermissionFlagsBits.BanMembers] + clientPermissions: ['BanMembers'], + userPermissions: ['BanMembers'] }); } diff --git a/src/commands/moderation/block.ts b/src/commands/moderation/block.ts index a3f7bc1..a5ad31d 100644 --- a/src/commands/moderation/block.ts +++ b/src/commands/moderation/block.ts @@ -3,11 +3,9 @@ import { blockResponse, BotCommand, castDurationContent, - clientSendAndPermCheck, emojis, format, Moderation, - userGuildPermCheck, type ArgType, type BlockResponse, type CommandMessage, @@ -15,7 +13,7 @@ import { type SlashMessage } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, PermissionFlagsBits, type GuildMember } from 'discord.js'; +import { ApplicationCommandOptionType, type GuildMember } from 'discord.js'; export default class BlockCommand extends BotCommand { public constructor() { @@ -57,8 +55,8 @@ export default class BlockCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m, [PermissionFlagsBits.ManageChannels]), - userPermissions: (m) => userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages]), + clientPermissions: ['ManageChannels'], + userPermissions: ['ManageMessages'], lock: 'channel' }); } diff --git a/src/commands/moderation/evidence.ts b/src/commands/moderation/evidence.ts index bc4cdb2..9a5e70f 100644 --- a/src/commands/moderation/evidence.ts +++ b/src/commands/moderation/evidence.ts @@ -1,20 +1,18 @@ import { BotCommand, - clientSendAndPermCheck, emojis, format, ModLog, OptArgType, regex, TanzaniteEvent, - userGuildPermCheck, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; import assert from 'assert/strict'; import { Argument, ArgumentGeneratorReturn } from 'discord-akairo'; -import { ApplicationCommandOptionType, PermissionFlagsBits, type Message } from 'discord.js'; +import { ApplicationCommandOptionType, type Message } from 'discord.js'; export default class EvidenceCommand extends BotCommand { public constructor() { @@ -55,8 +53,8 @@ export default class EvidenceCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m), - userPermissions: (m) => userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages]) + clientPermissions: [], + userPermissions: ['ManageMessages'] }); } diff --git a/src/commands/moderation/hideCase.ts b/src/commands/moderation/hideCase.ts index ca87ea5..6c50157 100644 --- a/src/commands/moderation/hideCase.ts +++ b/src/commands/moderation/hideCase.ts @@ -1,16 +1,6 @@ -import { - BotCommand, - clientSendAndPermCheck, - emojis, - format, - ModLog, - TanzaniteEvent, - userGuildPermCheck, - type CommandMessage, - type SlashMessage -} from '#lib'; +import { BotCommand, emojis, format, ModLog, TanzaniteEvent, type CommandMessage, type SlashMessage } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js'; +import { ApplicationCommandOptionType } from 'discord.js'; export default class HideCaseCommand extends BotCommand { public constructor() { @@ -31,8 +21,8 @@ export default class HideCaseCommand extends BotCommand { } ], slash: true, - clientPermissions: (m) => clientSendAndPermCheck(m), - userPermissions: (m) => userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages]), + clientPermissions: [], + userPermissions: ['ManageMessages'], channel: 'guild' }); } diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts index a5938f8..82ddce4 100644 --- a/src/commands/moderation/kick.ts +++ b/src/commands/moderation/kick.ts @@ -1,7 +1,6 @@ import { AllowedMentions, BotCommand, - clientSendAndPermCheck, emojis, format, kickResponse, @@ -13,7 +12,7 @@ import { type SlashMessage } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, PermissionFlagsBits, type GuildMember } from 'discord.js'; +import { ApplicationCommandOptionType, type GuildMember } from 'discord.js'; export default class KickCommand extends BotCommand { public constructor() { @@ -54,8 +53,8 @@ export default class KickCommand extends BotCommand { } ], slash: true, - clientPermissions: (m) => clientSendAndPermCheck(m, [PermissionFlagsBits.KickMembers]), - userPermissions: [PermissionFlagsBits.KickMembers] + clientPermissions: ['KickMembers'], + userPermissions: ['KickMembers'] }); } diff --git a/src/commands/moderation/lockdown.ts b/src/commands/moderation/lockdown.ts index 57f9caf..c88cc17 100644 --- a/src/commands/moderation/lockdown.ts +++ b/src/commands/moderation/lockdown.ts @@ -1,7 +1,6 @@ import { AllowedMentions, BotCommand, - clientSendAndPermCheck, colors, ConfirmationPrompt, emojis, @@ -17,7 +16,6 @@ import { Collection, Constants, NewsChannel, - PermissionFlagsBits, TextChannel, ThreadChannel, VoiceChannel @@ -62,8 +60,9 @@ export default class LockdownCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m, [PermissionFlagsBits.ManageChannels]), - userPermissions: [PermissionFlagsBits.ManageChannels], + clientPermissions: ['ManageChannels'], + userPermissions: ['ManageChannels'], + userCheckChannel: true, lock: 'channel' }); } diff --git a/src/commands/moderation/massBan.ts b/src/commands/moderation/massBan.ts index 4ba4f47..445506f 100644 --- a/src/commands/moderation/massBan.ts +++ b/src/commands/moderation/massBan.ts @@ -3,7 +3,6 @@ import { BanResponse, banResponse, BotCommand, - clientSendAndPermCheck, colors, emojis, overflowEmbed, @@ -15,7 +14,7 @@ import { type SlashMessage } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, Collection, PermissionFlagsBits } from 'discord.js'; +import { ApplicationCommandOptionType, Collection } from 'discord.js'; export default class MassBanCommand extends BotCommand { public constructor() { @@ -61,8 +60,9 @@ export default class MassBanCommand extends BotCommand { quoted: true, slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m), - userPermissions: [PermissionFlagsBits.BanMembers], + clientPermissions: ['EmbedLinks'], + clientCheckChannel: true, + userPermissions: ['BanMembers'], lock: 'user' }); } diff --git a/src/commands/moderation/massEvidence.ts b/src/commands/moderation/massEvidence.ts index b44060e..29d806e 100644 --- a/src/commands/moderation/massEvidence.ts +++ b/src/commands/moderation/massEvidence.ts @@ -1,6 +1,5 @@ import { BotCommand, - clientSendAndPermCheck, colors, emojis, ModLog, @@ -13,7 +12,7 @@ import { type SlashMessage } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js'; +import { ApplicationCommandOptionType } from 'discord.js'; import EvidenceCommand from './evidence.js'; export default class MassEvidenceCommand extends BotCommand { @@ -50,8 +49,8 @@ export default class MassEvidenceCommand extends BotCommand { quoted: true, slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m), - userPermissions: [PermissionFlagsBits.ManageMessages], + clientPermissions: ['EmbedLinks'], + userPermissions: ['ManageMessages'], lock: 'user' }); } diff --git a/src/commands/moderation/modlog.ts b/src/commands/moderation/modlog.ts index 08e5397..dcab9ef 100644 --- a/src/commands/moderation/modlog.ts +++ b/src/commands/moderation/modlog.ts @@ -3,19 +3,17 @@ import { BotCommand, ButtonPaginator, chunk, - clientSendAndPermCheck, colors, emojis, humanizeDuration, ModLog, timestamp, - userGuildPermCheck, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, escapeMarkdown, PermissionFlagsBits, User } from 'discord.js'; +import { ApplicationCommandOptionType, escapeMarkdown, User } from 'discord.js'; export default class ModlogCommand extends BotCommand { public static separator = '\n━━━━━━━━━━━━━━━\n'; @@ -48,8 +46,8 @@ export default class ModlogCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m), - userPermissions: (m) => userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages]) + clientPermissions: [], + userPermissions: ['ManageMessages'] }); } diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts index debcf03..9ffaf8d 100644 --- a/src/commands/moderation/mute.ts +++ b/src/commands/moderation/mute.ts @@ -2,12 +2,10 @@ import { AllowedMentions, BotCommand, castDurationContent, - clientSendAndPermCheck, emojis, format, Moderation, muteResponse, - userGuildPermCheck, type ArgType, type CommandMessage, type MuteResponse, @@ -15,7 +13,7 @@ import { type SlashMessage } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, PermissionFlagsBits, type GuildMember } from 'discord.js'; +import { ApplicationCommandOptionType, type GuildMember } from 'discord.js'; export default class MuteCommand extends BotCommand { public constructor() { @@ -57,8 +55,8 @@ export default class MuteCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m, [PermissionFlagsBits.ManageRoles]), - userPermissions: (m) => userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages]) + clientPermissions: ['ManageRoles'], + userPermissions: ['ManageMessages'] }); } diff --git a/src/commands/moderation/myLogs.ts b/src/commands/moderation/myLogs.ts index 34ab8e0..8faca8c 100644 --- a/src/commands/moderation/myLogs.ts +++ b/src/commands/moderation/myLogs.ts @@ -2,7 +2,6 @@ import { BotCommand, ButtonPaginator, chunk, - clientSendAndPermCheck, colors, emojis, ModLog, @@ -35,7 +34,8 @@ export default class MyLogsCommand extends BotCommand { ], slash: true, channel: null, - clientPermissions: (m) => clientSendAndPermCheck(m), + clientPermissions: ['EmbedLinks'], + clientCheckChannel: true, userPermissions: [] }); } diff --git a/src/commands/moderation/purge.ts b/src/commands/moderation/purge.ts index 106f394..1eff48e 100644 --- a/src/commands/moderation/purge.ts +++ b/src/commands/moderation/purge.ts @@ -1,16 +1,6 @@ -import { - Arg, - BotCommand, - clientSendAndPermCheck, - emojis, - OptArgType, - TanzaniteEvent, - type ArgType, - type CommandMessage, - type SlashMessage -} from '#lib'; +import { Arg, BotCommand, emojis, OptArgType, TanzaniteEvent, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, Collection, PermissionFlagsBits, type Message } from 'discord.js'; +import { ApplicationCommandOptionType, Collection, type Message } from 'discord.js'; export default class PurgeCommand extends BotCommand { public constructor() { @@ -52,9 +42,10 @@ export default class PurgeCommand extends BotCommand { } ], slash: true, - clientPermissions: (m) => - clientSendAndPermCheck(m, [PermissionFlagsBits.ManageMessages, PermissionFlagsBits.EmbedLinks], true), - userPermissions: [PermissionFlagsBits.ManageMessages], + clientPermissions: ['ManageMessages', 'EmbedLinks'], + clientCheckChannel: true, + userPermissions: ['ManageMessages'], + userCheckChannel: true, channel: 'guild' }); } diff --git a/src/commands/moderation/removeReactionEmoji.ts b/src/commands/moderation/removeReactionEmoji.ts index 5baeffc..a4ad4de 100644 --- a/src/commands/moderation/removeReactionEmoji.ts +++ b/src/commands/moderation/removeReactionEmoji.ts @@ -1,15 +1,6 @@ -import { - Arg, - BotCommand, - clientSendAndPermCheck, - emojis, - format, - type ArgType, - type CommandMessage, - type SlashMessage -} from '#lib'; +import { Arg, BotCommand, emojis, format, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, Message, PermissionFlagsBits } from 'discord.js'; +import { ApplicationCommandOptionType, Message } from 'discord.js'; export default class RemoveReactionEmojiCommand extends BotCommand { public constructor() { @@ -42,9 +33,10 @@ export default class RemoveReactionEmojiCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => - clientSendAndPermCheck(m, [PermissionFlagsBits.ManageMessages, PermissionFlagsBits.EmbedLinks], true), - userPermissions: [PermissionFlagsBits.ManageMessages, PermissionFlagsBits.ManageEmojisAndStickers] // Can't undo the removal of 1000s of reactions + clientPermissions: ['ManageMessages', 'EmbedLinks'], + clientCheckChannel: true, + userPermissions: ['ManageMessages', 'ManageEmojisAndStickers'], // Can't undo the removal of 1000s of reactions + userCheckChannel: true }); } diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts index 6b874da..565f214 100644 --- a/src/commands/moderation/role.ts +++ b/src/commands/moderation/role.ts @@ -2,7 +2,6 @@ import { addRoleResponse, AllowedMentions, BotCommand, - clientSendAndPermCheck, emojis, format, humanizeDuration, @@ -67,8 +66,8 @@ export default class RoleCommand extends BotCommand { channel: 'guild', flags: ['--force'], typing: true, - clientPermissions: (m) => - clientSendAndPermCheck(m, [PermissionFlagsBits.ManageRoles, PermissionFlagsBits.EmbedLinks], true), + clientPermissions: ['ManageRoles', 'EmbedLinks'], + clientCheckChannel: true, userPermissions: [] }); } diff --git a/src/commands/moderation/slowmode.ts b/src/commands/moderation/slowmode.ts index 66bc2a0..82d0264 100644 --- a/src/commands/moderation/slowmode.ts +++ b/src/commands/moderation/slowmode.ts @@ -1,18 +1,7 @@ -import { - Arg, - BotCommand, - clientSendAndPermCheck, - emojis, - format, - humanizeDuration, - userGuildPermCheck, - type CommandMessage, - type OptArgType, - type SlashMessage -} from '#lib'; +import { Arg, BotCommand, emojis, format, humanizeDuration, type CommandMessage, type OptArgType, type SlashMessage } from '#lib'; import assert from 'assert/strict'; import { Argument } from 'discord-akairo'; -import { ApplicationCommandOptionType, ChannelType, PermissionFlagsBits } from 'discord.js'; +import { ApplicationCommandOptionType, ChannelType } from 'discord.js'; export default class SlowmodeCommand extends BotCommand { public constructor() { @@ -46,9 +35,8 @@ export default class SlowmodeCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => - clientSendAndPermCheck(m, [PermissionFlagsBits.ManageChannels, PermissionFlagsBits.EmbedLinks], true), - userPermissions: (m) => userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages]) + clientPermissions: ['ManageChannels', 'EmbedLinks'], + userPermissions: ['ManageMessages'] }); } diff --git a/src/commands/moderation/timeout.ts b/src/commands/moderation/timeout.ts index 5ab62e4..7bb02f7 100644 --- a/src/commands/moderation/timeout.ts +++ b/src/commands/moderation/timeout.ts @@ -2,7 +2,6 @@ import { AllowedMentions, BotCommand, castDurationContent, - clientSendAndPermCheck, emojis, format, Moderation, @@ -13,7 +12,7 @@ import { type TimeoutResponse } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, PermissionFlagsBits, type GuildMember } from 'discord.js'; +import { ApplicationCommandOptionType, type GuildMember } from 'discord.js'; export default class TimeoutCommand extends BotCommand { public constructor() { @@ -54,8 +53,8 @@ export default class TimeoutCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m, [PermissionFlagsBits.ModerateMembers]), - userPermissions: [PermissionFlagsBits.ModerateMembers] + clientPermissions: ['ModerateMembers'], + userPermissions: ['ModerateMembers'] }); } diff --git a/src/commands/moderation/unban.ts b/src/commands/moderation/unban.ts index 29dedab..537e176 100644 --- a/src/commands/moderation/unban.ts +++ b/src/commands/moderation/unban.ts @@ -12,7 +12,7 @@ import { type UnbanResponse } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, PermissionFlagsBits, type User } from 'discord.js'; +import { ApplicationCommandOptionType, type User } from 'discord.js'; export default class UnbanCommand extends BotCommand { public constructor() { @@ -44,8 +44,8 @@ export default class UnbanCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: [PermissionFlagsBits.BanMembers], - userPermissions: [PermissionFlagsBits.BanMembers] + clientPermissions: ['BanMembers'], + userPermissions: ['BanMembers'] }); } diff --git a/src/commands/moderation/unblock.ts b/src/commands/moderation/unblock.ts index e342f0f..4838392 100644 --- a/src/commands/moderation/unblock.ts +++ b/src/commands/moderation/unblock.ts @@ -1,12 +1,10 @@ import { AllowedMentions, BotCommand, - clientSendAndPermCheck, emojis, format, Moderation, unblockResponse, - userGuildPermCheck, type ArgType, type CommandMessage, type OptArgType, @@ -14,7 +12,7 @@ import { type UnblockResponse } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, PermissionFlagsBits, type GuildMember } from 'discord.js'; +import { ApplicationCommandOptionType, type GuildMember } from 'discord.js'; export default class UnblockCommand extends BotCommand { public constructor() { @@ -56,8 +54,8 @@ export default class UnblockCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m, [PermissionFlagsBits.ManageChannels]), - userPermissions: (m) => userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages]) + clientPermissions: ['ManageChannels'], + userPermissions: ['ManageMessages'] }); } diff --git a/src/commands/moderation/unlockdown.ts b/src/commands/moderation/unlockdown.ts index 38d2fe6..09b78a0 100644 --- a/src/commands/moderation/unlockdown.ts +++ b/src/commands/moderation/unlockdown.ts @@ -1,6 +1,6 @@ import { LockdownCommand } from '#commands'; -import { BotCommand, clientSendAndPermCheck, type ArgType, type CommandMessage, type OptArgType, type SlashMessage } from '#lib'; -import { ApplicationCommandOptionType, Constants, PermissionFlagsBits } from 'discord.js'; +import { BotCommand, type ArgType, type CommandMessage, type OptArgType, type SlashMessage } from '#lib'; +import { ApplicationCommandOptionType, Constants } from 'discord.js'; export default class UnlockdownCommand extends BotCommand { public constructor() { @@ -41,8 +41,8 @@ export default class UnlockdownCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m, [PermissionFlagsBits.ManageChannels]), - userPermissions: [PermissionFlagsBits.ManageChannels] + clientPermissions: ['ManageChannels'], + userPermissions: ['ManageChannels'] }); } diff --git a/src/commands/moderation/unmute.ts b/src/commands/moderation/unmute.ts index 4f408eb..a4d348d 100644 --- a/src/commands/moderation/unmute.ts +++ b/src/commands/moderation/unmute.ts @@ -1,16 +1,14 @@ import { AllowedMentions, - clientSendAndPermCheck, formatUnmuteResponse, Moderation, - userGuildPermCheck, type ArgType, type CommandMessage, type OptArgType, type SlashMessage } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js'; +import { ApplicationCommandOptionType } from 'discord.js'; import { BotCommand } from '../../../lib/extensions/discord-akairo/BotCommand.js'; export default class UnmuteCommand extends BotCommand { @@ -53,8 +51,8 @@ export default class UnmuteCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m, [PermissionFlagsBits.ManageRoles]), - userPermissions: (m) => userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages]) + clientPermissions: ['ManageRoles'], + userPermissions: ['ManageMessages'] }); } diff --git a/src/commands/moderation/untimeout.ts b/src/commands/moderation/untimeout.ts index 8bc977b..3775c65 100644 --- a/src/commands/moderation/untimeout.ts +++ b/src/commands/moderation/untimeout.ts @@ -1,7 +1,6 @@ import { AllowedMentions, BotCommand, - clientSendAndPermCheck, emojis, format, Moderation, @@ -13,7 +12,7 @@ import { type SlashMessage } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, PermissionFlagsBits, type GuildMember } from 'discord.js'; +import { ApplicationCommandOptionType, type GuildMember } from 'discord.js'; export default class UntimeoutCommand extends BotCommand { public constructor() { @@ -55,8 +54,8 @@ export default class UntimeoutCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m, [PermissionFlagsBits.ModerateMembers]), - userPermissions: [PermissionFlagsBits.ModerateMembers] + clientPermissions: ['ModerateMembers'], + userPermissions: ['ModerateMembers'] }); } diff --git a/src/commands/moderation/warn.ts b/src/commands/moderation/warn.ts index 9547583..4bc7f13 100644 --- a/src/commands/moderation/warn.ts +++ b/src/commands/moderation/warn.ts @@ -1,12 +1,10 @@ import { AllowedMentions, BotCommand, - clientSendAndPermCheck, emojis, format, Moderation, ordinal, - userGuildPermCheck, warnResponse, type ArgType, type CommandMessage, @@ -15,7 +13,7 @@ import { type WarnResponse } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, PermissionFlagsBits, type GuildMember } from 'discord.js'; +import { ApplicationCommandOptionType, type GuildMember } from 'discord.js'; export default class WarnCommand extends BotCommand { public constructor() { @@ -56,8 +54,8 @@ export default class WarnCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m), - userPermissions: (m) => userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages]) + clientPermissions: [], + userPermissions: ['ManageMessages'] }); } |