From 8cda43d503797556576c19eeb42c845342a7e206 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Tue, 21 May 2024 21:10:30 -0400 Subject: [PATCH] Reloading all is a bit slow --- commands/util/reload.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/commands/util/reload.js b/commands/util/reload.js index 3116559a..7efe3bd7 100644 --- a/commands/util/reload.js +++ b/commands/util/reload.js @@ -14,8 +14,7 @@ module.exports = class ReloadCommand extends Command { { key: 'command', label: 'command', - type: 'command', - default: '' + type: 'command' } ] }); @@ -24,17 +23,10 @@ module.exports = class ReloadCommand extends Command { run(msg, { command }) { this.client.exportCommandLeaderboard(); this.client.exportLastRun(); - if (command) { - command.reload(); - } else { - for (const cmd of this.client.registry.commands.values()) { - cmd.reload(); - } - } + command.reload(); this.client.importCommandLeaderboard(); this.client.importLastRun(); this.client.registry.commands.get('cloc').cache = null; - if (!command) return msg.say('Reloaded all commands.'); return msg.say(`Reloaded the \`${command.name}\` command.`); } };