From 09e475f40ba6d3d7f63c51bf63123d7d28113821 Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@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}`);