diff options
| author | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
| commit | bb511abc03bb66848947e37a999502b813c77269 (patch) | |
| tree | 612c010fc8317e1cdf11471a18aad0270819d33e /server/src/commands/owner/Reload.ts | |
| parent | fix: if clear amount equal or over 100, round down to 99 (diff) | |
| download | dep-core-bb511abc03bb66848947e37a999502b813c77269.tar.xz dep-core-bb511abc03bb66848947e37a999502b813c77269.zip | |
goodbye old uwufier :cry:
Diffstat (limited to 'server/src/commands/owner/Reload.ts')
| -rw-r--r-- | server/src/commands/owner/Reload.ts | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/server/src/commands/owner/Reload.ts b/server/src/commands/owner/Reload.ts new file mode 100644 index 0000000..ac7bd1f --- /dev/null +++ b/server/src/commands/owner/Reload.ts @@ -0,0 +1,40 @@ +import { Command } from 'discord-akairo'; +import { Message } from 'discord.js'; + +export default class ReloadOwner extends Command { + public constructor() { + super('reload', { + aliases: ['reload', 'reboot', 'reloadlistener'], + category: 'owner', + description: { + content: 'Reload a command.', + usage: '[command]', + examples: [ + 'ping' + ] + }, + ratelimit: 3, + args: [ + { + id: 'command', + type: 'string', + prompt: { + start: 'What command would you like to reload?', + }, + match: 'rest' + } + ], + ownerOnly: true + }); + } + + public exec(msg: Message, { command }): Promise<Message> { + if (msg.util.parsed.alias == 'reloadlistener') { + this.client.listenerHandler.reload(command); + return msg.channel.send(`Successfully reloaded the listener ${command}`); + } else { + this.handler.reload(command); + return msg.channel.send(`Successfully reloaded the command ${command}`); + } + } +}
\ No newline at end of file |