From 9f8eb45f818edd56ebce5f39cd90cca85dd2ca24 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Fri, 15 Nov 2019 22:50:24 +0100 Subject: [PATCH] Log the loading of command --- event/listeners/load.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 event/listeners/load.js diff --git a/event/listeners/load.js b/event/listeners/load.js new file mode 100644 index 00000000..ea6ca864 --- /dev/null +++ b/event/listeners/load.js @@ -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; \ No newline at end of file