From 68ee6eb4e97f4b097d2e847e8065d4da11f348f6 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 11 Jan 2018 19:24:13 +0000 Subject: [PATCH] Reload --- commands/util/reload.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 commands/util/reload.js diff --git a/commands/util/reload.js b/commands/util/reload.js new file mode 100644 index 00000000..fb93c1e0 --- /dev/null +++ b/commands/util/reload.js @@ -0,0 +1,26 @@ +const { Command } = require('discord.js-commando'); + +module.exports = class ReloadCommand extends Command { + constructor(client) { + super(client, { + name: 'reload', + group: 'util', + memberName: 'reload', + description: 'Reloads a command.', + ownerOnly: true, + guarded: true, + args: [ + { + key: 'command', + prompt: 'Which command would you like to reload?', + type: 'command' + } + ] + }); + } + + run(msg, { command }) { + command.reload(); + return msg.say(`Reloaded \`${command.name}\`.`); + } +};