diff --git a/commands/owner/reloadcmd.js b/commands/owner/reload.js similarity index 53% rename from commands/owner/reloadcmd.js rename to commands/owner/reload.js index 7ab8dbfd..4e729aba 100644 --- a/commands/owner/reloadcmd.js +++ b/commands/owner/reload.js @@ -3,7 +3,7 @@ const { Command } = require('discord-akairo'); class reloadcmdCommand extends Command { constructor() { super('reloadcmd', { - aliases: ['reloadcmd'], + aliases: ['reloadcmd', 'reloadlistener', 'reload'], category: 'owner', ownerOnly: 'true', args: [ @@ -22,8 +22,15 @@ class reloadcmdCommand extends Command { } async exec(message, args) { - this.handler.reload(args.command); - return message.channel.send(`successfully reloaded command ${args.command}`); + if (message.util.parsed.alias == 'reloadlistener') { + this.client.listenerHandler.reload(args.command); + return message.channel.send(`successfully reloaded listener ${args.command}`); + } else { + this.handler.reload(args.command); + return message.channel.send(`successfully reloaded command ${args.command}`); + } + + } } diff --git a/commands/owner/reloadlisteners.js b/commands/owner/reloadlisteners.js deleted file mode 100644 index 8dcc5a71..00000000 --- a/commands/owner/reloadlisteners.js +++ /dev/null @@ -1,30 +0,0 @@ -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