Browse Source

Use new logger for events

pull/28/head
Abheek Dhawan 3 years ago
parent
commit
1a3553cf86
Signed by: abheekd GPG Key ID: 7BE81B8C14475B67
  1. 4
      events/interactionCreate.js

4
events/interactionCreate.js

@ -1,3 +1,5 @@
const { log } = require('../helpers/log');
module.exports = {
name: 'interactionCreate',
once: false,
@ -13,7 +15,7 @@ module.exports = {
await command.execute(interaction);
}
catch (error) {
console.error(error);
log({ logger: 'interaction', content: `Interaction ${interaction.name} failed!`, level: 'error' });
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
}
},

Loading…
Cancel
Save