diff options
Diffstat (limited to 'src/commands/moderation')
-rw-r--r-- | src/commands/moderation/_lockdown.ts | 2 | ||||
-rw-r--r-- | src/commands/moderation/ban.ts | 2 | ||||
-rw-r--r-- | src/commands/moderation/kick.ts | 2 | ||||
-rw-r--r-- | src/commands/moderation/modlog.ts | 2 | ||||
-rw-r--r-- | src/commands/moderation/mute.ts | 2 | ||||
-rw-r--r-- | src/commands/moderation/removeReactionEmoji.ts | 2 | ||||
-rw-r--r-- | src/commands/moderation/role.ts | 2 | ||||
-rw-r--r-- | src/commands/moderation/slowmode.ts | 2 | ||||
-rw-r--r-- | src/commands/moderation/unban.ts | 9 | ||||
-rw-r--r-- | src/commands/moderation/unmute.ts | 5 | ||||
-rw-r--r-- | src/commands/moderation/warn.ts | 2 |
11 files changed, 19 insertions, 13 deletions
diff --git a/src/commands/moderation/_lockdown.ts b/src/commands/moderation/_lockdown.ts index df5a9b4..374e8f1 100644 --- a/src/commands/moderation/_lockdown.ts +++ b/src/commands/moderation/_lockdown.ts @@ -31,7 +31,7 @@ export default class LockdownCommand extends BushCommand { userPermissions: ['SEND_MESSAGES'] }); } - public async exec(message: BushMessage | BushSlashMessage, { all }: { all: boolean }): Promise<unknown> { + public override async exec(message: BushMessage | BushSlashMessage, { all }: { all: boolean }): Promise<unknown> { return await message.util.reply('no'); if (!all) { if (!['GUILD_TEXT', 'GUILD_NEWS'].includes(message.channel.type)) diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts index 9239f2a..cfa3e31 100644 --- a/src/commands/moderation/ban.ts +++ b/src/commands/moderation/ban.ts @@ -80,7 +80,7 @@ export default class BanCommand extends BushCommand { userPermissions: ['BAN_MEMBERS'] }); } - async exec( + override async exec( message: BushMessage | BushSlashMessage, { user, diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts index 5fd83b7..c425124 100644 --- a/src/commands/moderation/kick.ts +++ b/src/commands/moderation/kick.ts @@ -55,7 +55,7 @@ export default class KickCommand extends BushCommand { }); } - async exec( + override async exec( message: BushMessage | BushSlashMessage, { user, reason, force }: { user: BushUser; reason?: string; force: boolean } ): Promise<unknown> { diff --git a/src/commands/moderation/modlog.ts b/src/commands/moderation/modlog.ts index 4850a4d..8f727a5 100644 --- a/src/commands/moderation/modlog.ts +++ b/src/commands/moderation/modlog.ts @@ -46,7 +46,7 @@ export default class ModlogCommand extends BushCommand { return modLog.join(`\n`); } - async exec(message: BushMessage | BushSlashMessage, { search }: { search: BushUser | string }): Promise<unknown> { + override async exec(message: BushMessage | BushSlashMessage, { search }: { search: BushUser | string }): Promise<unknown> { const foundUser = search instanceof User ? search : await util.resolveUserAsync(search); if (foundUser) { const logs = await ModLog.findAll({ diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts index 7f3edbb..df8e235 100644 --- a/src/commands/moderation/mute.ts +++ b/src/commands/moderation/mute.ts @@ -56,7 +56,7 @@ export default class MuteCommand extends BushCommand { userPermissions: ['MANAGE_MESSAGES'] }); } - async exec( + public override async exec( message: BushMessage | BushSlashMessage, { user, reason, force }: { user: BushUser; reason?: { duration: number; contentWithoutTime: string }; force: boolean } ): Promise<unknown> { diff --git a/src/commands/moderation/removeReactionEmoji.ts b/src/commands/moderation/removeReactionEmoji.ts index de5e8ce..075b822 100644 --- a/src/commands/moderation/removeReactionEmoji.ts +++ b/src/commands/moderation/removeReactionEmoji.ts @@ -36,7 +36,7 @@ export default class RemoveReactionEmojiCommand extends BushCommand { }); } - public async exec( + public override async exec( message: BushMessage, { messageToRemoveFrom, emoji }: { messageToRemoveFrom: BushMessage; emoji: Emoji | BigInt } ): Promise<unknown> { diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts index bd8cf8d..1371ee8 100644 --- a/src/commands/moderation/role.ts +++ b/src/commands/moderation/role.ts @@ -90,7 +90,7 @@ export default class RoleCommand extends BushCommand { }); } - public async exec( + public override async exec( message: BushMessage | BushSlashMessage, { action, user, role, duration }: { action: 'add' | 'remove'; user: BushGuildMember; role: BushRole; duration: number } ): Promise<unknown> { diff --git a/src/commands/moderation/slowmode.ts b/src/commands/moderation/slowmode.ts index 441a0ac..fd3aec6 100644 --- a/src/commands/moderation/slowmode.ts +++ b/src/commands/moderation/slowmode.ts @@ -48,7 +48,7 @@ export default class SlowModeCommand extends BushCommand { }); } - public async exec( + public override async exec( message: BushMessage | BushSlashMessage, { length, diff --git a/src/commands/moderation/unban.ts b/src/commands/moderation/unban.ts index 8aa9ef0..522c715 100644 --- a/src/commands/moderation/unban.ts +++ b/src/commands/moderation/unban.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, BushMessage, BushSlashMessage } from '@lib'; +import { AllowedMentions, BushCommand, BushMessage, BushSlashMessage, BushUser } from '@lib'; import { User } from 'discord.js'; export default class UnbanCommand extends BushCommand { @@ -51,9 +51,12 @@ export default class UnbanCommand extends BushCommand { userPermissions: ['BAN_MEMBERS'] }); } - async exec(message: BushMessage | BushSlashMessage, { user, reason }: { user: User; reason?: string }): Promise<unknown> { + override async exec( + message: BushMessage | BushSlashMessage, + { user, reason }: { user: BushUser; reason?: string } + ): Promise<unknown> { if (!(user instanceof User)) { - user = util.resolveUser(user, client.users.cache); + user = util.resolveUser(user, client.users.cache) as BushUser; } const responseCode = await message.guild.unban({ user, diff --git a/src/commands/moderation/unmute.ts b/src/commands/moderation/unmute.ts index 528317c..6cdb08b 100644 --- a/src/commands/moderation/unmute.ts +++ b/src/commands/moderation/unmute.ts @@ -50,7 +50,10 @@ export default class UnmuteCommand extends BushCommand { userPermissions: ['MANAGE_MESSAGES'] }); } - async exec(message: BushMessage | BushSlashMessage, { user, reason }: { user: BushUser; reason?: string }): Promise<unknown> { + override async exec( + message: BushMessage | BushSlashMessage, + { user, reason }: { user: BushUser; reason?: string } + ): Promise<unknown> { const error = util.emojis.error; const member = message.guild.members.cache.get(user.id) as BushGuildMember; const canModerateResponse = util.moderationPermissionCheck(message.member, member, 'unmute'); diff --git a/src/commands/moderation/warn.ts b/src/commands/moderation/warn.ts index 3f9e9b5..1067033 100644 --- a/src/commands/moderation/warn.ts +++ b/src/commands/moderation/warn.ts @@ -54,7 +54,7 @@ export default class WarnCommand extends BushCommand { userPermissions: ['MANAGE_MESSAGES'] }); } - public async exec( + public override async exec( message: BushMessage | BushSlashMessage, { user, reason, force }: { user: BushUser; reason: string; force: boolean } ): Promise<unknown> { |