From 7eed1d55ab09a2d0207b21aacba2f9348959b833 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Fri, 10 Feb 2023 18:48:29 -0800 Subject: [PATCH] Fix bug with unusable slash commands --- src/events/interactionCreate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts index 294fb6c..4914b58 100644 --- a/src/events/interactionCreate.ts +++ b/src/events/interactionCreate.ts @@ -2,7 +2,7 @@ import Discord from 'discord.js'; import TClient from '../client'; export default { async run(client:TClient, interaction:Discord.ChatInputCommandInteraction){ - if (!interaction.inGuild() || !interaction.inCachedGuild() || !interaction.command) return; + if (!interaction.inGuild() || !interaction.inCachedGuild()) return; if (interaction.isChatInputCommand()){ const commandFile = client.commands.get(interaction.commandName); console.log(`[${client.moment().format('DD/MM/YY HH:mm:ss')}] ${interaction.user.tag} used /${interaction.commandName} ${interaction.options.getSubcommand(false) ?? ''} in #${interaction.channel.name}`);