mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
31 lines
703 B
JavaScript
31 lines
703 B
JavaScript
const Command = require('../../structures/Command');
|
|
|
|
module.exports = class ShutdownCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'shutdown',
|
|
aliases: ['die', 'explode', 'restart', 'process.exit'],
|
|
group: 'util',
|
|
memberName: 'shutdown',
|
|
description: 'Shuts down 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 }) {
|
|
this.client.logger.info('[SHUTDOWN] Manual shutdown engaged.');
|
|
process.exit(code);
|
|
return null;
|
|
}
|
|
};
|