Restart Command

This commit is contained in:
Dragon Fire
2020-03-06 17:49:32 -05:00
parent 1a46dd5c93
commit d15deb5949
3 changed files with 32 additions and 2 deletions
+29
View File
@@ -0,0 +1,29 @@
const Command = require('../../structures/Command');
module.exports = class RestartCommand extends Command {
constructor(client) {
super(client, {
name: 'restart',
aliases: ['die', 'explode', 'shutdown', 'process.exit'],
group: 'util',
memberName: 'restart',
description: 'Restarts the bot.',
details: 'Only the bot owner(s) may use this command.',
guarded: true,
ownerOnly: true,
args: [
{
key: 'code',
prompt: 'What code do you want to send to `process.exit`?',
type: 'integer',
default: 0
}
]
});
}
run(msg, { code }) {
process.exit(code);
return null;
}
};