mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Restart Command
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user