Log the loading of command

This commit is contained in:
loicbersier 2019-11-15 22:50:24 +01:00
parent 88dbd91e18
commit 9f8eb45f81

20
event/listeners/load.js Normal file
View file

@ -0,0 +1,20 @@
const { Listener } = require('discord-akairo');
class loadListener extends Listener {
constructor() {
super('load', {
emitter: 'commandHandler',
event: 'load'
});
}
async exec(command, isReload) {
if (isReload) {
console.log(`Successfully reloaded command \x1b[32m${command.categoryID}/${command.id}\x1b[0m`);
} else {
console.log(`Successfully loaded command \x1b[32m${command.categoryID}/${command.id}\x1b[0m`);
}
}
}
module.exports = loadListener;