Redis disabled commands

This commit is contained in:
Dragon Fire
2024-03-30 01:10:39 -04:00
parent 4d88d529df
commit 5153a201f6
3 changed files with 11 additions and 2 deletions
+2 -1
View File
@@ -20,9 +20,10 @@ module.exports = class EnableCommand extends Command {
});
}
run(msg, { command }) {
async run(msg, { command }) {
if (command._enabled) return msg.say(`The \`${command.name}\` command is already enabled.`);
command.enable();
await this.client.redis.hdel('disabled', command.name);
return msg.say(`Enabled the \`${command.name}\` command.`);
}
};