1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 04:10:59 -05:00

Fix bug with unusable slash commands

This commit is contained in:
TÆMBØ 2023-02-10 18:48:29 -08:00
parent 78264e987e
commit a68fcb20ad

View File

@ -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}`);