From 0d94fa1471ba4e29026b2db9570db2b9795bec6d Mon Sep 17 00:00:00 2001 From: loicbersier Date: Fri, 31 May 2019 16:26:13 +0200 Subject: [PATCH] unload command --- commands/owner/unload.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 commands/owner/unload.js diff --git a/commands/owner/unload.js b/commands/owner/unload.js new file mode 100644 index 00000000..f9b351ff --- /dev/null +++ b/commands/owner/unload.js @@ -0,0 +1,30 @@ +const { Command } = require('discord-akairo'); + +class unloadCommand extends Command { + constructor() { + super('unload', { + aliases: ['unload'], + category: 'owner', + ownerOnly: 'true', + args: [ + { + id: 'command', + type: 'string', + match: 'rest' + } + ], + description: { + content: 'Unload command', + usage: '[command]', + examples: ['ping'] + } + }); + } + + async exec(message, args) { + this.handler.remove(args.command); + return message.channel.send(`Sucessfully unloaded command ${args.command}`); + } +} + +module.exports = unloadCommand; \ No newline at end of file