Add load, unload, and update-env from Hermes

This commit is contained in:
Dragon Fire
2024-03-24 16:18:18 -04:00
parent dd12aa7db7
commit 0c7c8abc37
3 changed files with 91 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
const Command = require('../../framework/Command');
module.exports = class UnloadCommand extends Command {
constructor(client) {
super(client, {
name: 'unload',
aliases: ['unload-command', 'unload-cmd', 'delete-command', 'delete-cmd'],
group: 'util',
memberName: 'unload',
description: 'Unloads a command.',
details: 'Only the bot owner(s) may use this command.',
ownerOnly: true,
args: [
{
key: 'command',
prompt: 'What is the command\'s name?',
type: 'command'
}
]
});
}
run(msg, { command }) {
this.client.registry.commands.delete(command.name);
this.client.registry.commands.get('cloc').cache = null;
return msg.say(`Unloaded the \`${command.name}\` command.`);
}
};