From f0d45b2c926ed753e2d21f2e06e24d7e6c43880a Mon Sep 17 00:00:00 2001 From: GramingFoxTeam Date: Thu, 17 Nov 2022 16:03:40 +0300 Subject: [PATCH] fix(discord-bot): also execute slash commands --- bots/discord/events/discord/interactionCreate.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bots/discord/events/discord/interactionCreate.js b/bots/discord/events/discord/interactionCreate.js index 82a9b14..550afc0 100644 --- a/bots/discord/events/discord/interactionCreate.js +++ b/bots/discord/events/discord/interactionCreate.js @@ -4,7 +4,11 @@ export default { name: Events.InteractionCreate, once: false, async execute(interaction) { - if (!interaction.isMessageContextMenuCommand()) return; + if ( + !interaction.isMessageContextMenuCommand() || + !interaction.isChatInputCommand() + ) + return; const command = interaction.client.commands.get(interaction.commandName);