Fix session reset commands
This commit is contained in:
parent
5c1841472a
commit
127a02e8f2
3
index.js
3
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;
|
||||
|
|
Loading…
Reference in a new issue