From 127a02e8f273d358c724ac3792dcdac0268e7483 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Thu, 9 Mar 2023 08:30:14 -0700 Subject: [PATCH] Fix session reset commands --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index 226ed62..7de3540 100644 --- a/index.js +++ b/index.js @@ -56,11 +56,10 @@ client.on("ready", () => { client.on('interactionCreate', async (interaction) => { if (!interaction.isCommand()) return; - if (!config.discord.authorized_channels.includes(interaction.channelId)) return; // Only allow messages in the authorized channels + if (!config.discord.authorized_channels.includes(interaction.channelId) && !config.discord.authorized_channels.includes(interaction.channel.parentId)) return; // Only allow messages in the authorized channels switch (interaction.commandName) { case "reset": // Remove the session - console.log(`${colors.cyan("[INFO]")} Resetting session for ${colors.green(interaction.channelId)} (${interaction.channel.name})}`) await delete sessions[interaction.channelId]; interaction.reply(lang.reset); break;