Improved logging
This commit is contained in:
5
index.js
5
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) {
|
||||
|
||||
Reference in New Issue
Block a user