Improved logging

This commit is contained in:
Logan Cusano
2023-02-25 01:11:32 -05:00
parent 795c3b6a61
commit d9d90c7935

View File

@@ -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) {