From 963981401dcfee7cbc768aef5d04e859bbe438f5 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Tue, 31 Dec 2019 12:19:05 +0100 Subject: [PATCH] reload listener --- commands/owner/reloadlisteners.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 commands/owner/reloadlisteners.js diff --git a/commands/owner/reloadlisteners.js b/commands/owner/reloadlisteners.js new file mode 100644 index 00000000..8dcc5a71 --- /dev/null +++ b/commands/owner/reloadlisteners.js @@ -0,0 +1,30 @@ +const { Command } = require('discord-akairo'); + +class reloadlistenerCommand extends Command { + constructor() { + super('reloadlistener', { + aliases: ['reloadlistener'], + category: 'owner', + ownerOnly: 'true', + args: [ + { + id: 'listener', + type: 'string', + match: 'rest' + } + ], + description: { + content: 'reload command', + usage: '[command]', + examples: ['ping'] + } + }); + } + + async exec(message, args) { + this.client.listenerHandler.reload(args.listener); + return message.channel.send(`successfully reloaded listener ${args.listener}`); + } +} + +module.exports = reloadlistenerCommand; \ No newline at end of file