From d9d90c79357fcf2154b9496a1c9ea9bdc59f364e Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sat, 25 Feb 2023 01:11:32 -0500 Subject: [PATCH] Improved logging --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index bed6b35..312b2fe 100644 --- a/index.js +++ b/index.js @@ -132,14 +132,15 @@ client.on('ready', () => { client.on(Events.InteractionCreate, async interaction => { if (!interaction.isChatInputCommand()) return; - const command = interaction.client.commands.get(interaction.commandName); - log.DEBUG("Interaction: ", interaction.client); + const command = interaction.client.commands.get(interaction.commandName); if (!command) { console.error(`No command matching ${interaction.commandName} was found.`); return; } + log.DEBUG(`${interaction.member.user} is running '${command}'`); + try { await command.execute(interaction); } catch (error) {