1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-09-29 12:30:58 -04:00

Fix bug with unusable slash commands

This commit is contained in:
toast-ts 2023-02-10 18:48:29 -08:00
parent 1649050980
commit 7eed1d55ab

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