aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation/removeReactionEmoji.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/moderation/removeReactionEmoji.ts')
-rw-r--r--src/commands/moderation/removeReactionEmoji.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/commands/moderation/removeReactionEmoji.ts b/src/commands/moderation/removeReactionEmoji.ts
index bede2cf..919ee40 100644
--- a/src/commands/moderation/removeReactionEmoji.ts
+++ b/src/commands/moderation/removeReactionEmoji.ts
@@ -1,4 +1,5 @@
-import { ArgType, BushCommand, type BushMessage } from '#lib';
+import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
+import assert from 'assert';
import { Message, type Emoji } from 'discord.js';
export default class RemoveReactionEmojiCommand extends BushCommand {
@@ -37,9 +38,10 @@ export default class RemoveReactionEmojiCommand extends BushCommand {
}
public override async exec(
- message: BushMessage,
+ message: BushMessage | BushSlashMessage,
args: { message: ArgType<'guildMessage'> | string; emoji: ArgType<'emoji'> | ArgType<'snowflake'> }
) {
+ assert(message.channel);
const resolvedMessage = args.message instanceof Message ? args.message : await message.channel.messages.fetch(args.message);
const id = !(['string'] as const).includes(typeof args.emoji);