Import Command Leaderboard after reload

This commit is contained in:
Dragon Fire
2020-11-09 15:39:51 -05:00
parent c98492f405
commit f139789496
2 changed files with 10 additions and 11 deletions
+9 -10
View File
@@ -7,25 +7,24 @@ module.exports = class ReloadCommand extends Command {
aliases: ['reload-command', 'reload-cmd'],
group: 'util',
memberName: 'reload',
description: 'Reloads a command or command group.',
description: 'Reloads a command.',
details: 'Only the bot owner(s) may use this command.',
guarded: true,
ownerOnly: true,
args: [
{
key: 'cmdOrGrp',
label: 'command/group',
prompt: 'Which command or group would you like to reload?',
type: 'command|group'
key: 'command',
label: 'command',
prompt: 'Which command would you like to reload?',
type: 'command'
}
]
});
}
run(msg, { cmdOrGrp }) {
const isCmd = Boolean(cmdOrGrp.groupID);
cmdOrGrp.reload();
if (isCmd) return msg.say(`Reloaded the \`${cmdOrGrp.name}\` command.`);
return msg.say(`Reloaded all of the commands in the \`${cmdOrGrp.name}\` group.`);
run(msg, { command }) {
command.reload();
this.client.importCommandLeaderboard();
return msg.say(`Reloaded the \`${command.name}\` command.`);
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "119.40.0",
"version": "119.40.1",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {