mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 13:53:12 +02:00
Import Command Leaderboard after reload
This commit is contained in:
+9
-10
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "119.40.0",
|
||||
"version": "119.40.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user