mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-11 15:57:50 +02:00
Add enable and disable commands
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
const Command = require('../../framework/Command');
|
||||
|
||||
module.exports = class EnableCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'enable',
|
||||
aliases: ['enable-command', 'enable-cmd'],
|
||||
group: 'util',
|
||||
memberName: 'enable',
|
||||
description: 'Enables a command.',
|
||||
details: 'Only the bot owner(s) may use this command.',
|
||||
ownerOnly: true,
|
||||
guarded: true,
|
||||
args: [
|
||||
{
|
||||
key: 'command',
|
||||
type: 'command'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { command }) {
|
||||
if (command._enabled) return msg.say(`The \`${command.name}\` command is already enabled.`);
|
||||
command.enable();
|
||||
return msg.say(`Enabled the \`${command.name}\` command.`);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user