diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts index 8418266..781def3 100644 --- a/src/events/interactionCreate.ts +++ b/src/events/interactionCreate.ts @@ -15,26 +15,25 @@ export default { await interaction.reply({ content: "Command not found", ephemeral: true }); return; } - if (command.isMod) { - const interactionChannelId = interaction.channelId; - const envChannelId = env.MOD_CHANNEL_ID; - if (interactionChannelId !== envChannelId) { - await interaction.reply({ - content: "This command can only be executed in a specific channel.", - ephemeral: true, - }); - return; - } - try { - command.execute(interaction); - } catch (err) { - console.error(err); - await interaction.reply({ - content: "There was an error while executing this command!", - ephemeral: true, - }); - } + const interactionChannelId = interaction.channelId; + const envChannelId = env.MOD_CHANNEL_ID; + if (command.isMod && interactionChannelId !== envChannelId) { + await interaction.reply({ + content: "This command can only be executed in a specific channel.", + ephemeral: true, + }); + return; + } + + try { + command.execute(interaction); + } catch (err) { + console.error(err); + await interaction.reply({ + content: "There was an error while executing this command!", + ephemeral: true, + }); } }, };