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
+2 -1
View File
@@ -119,7 +119,7 @@ don't grant that permission.
## Commands
Total: 363
Total: 364
### Utility:
@@ -135,6 +135,7 @@ Total: 363
* **options:** Responds with a list of server options.
* **ping:** Checks the bot's ping to the Discord server.
* **report:** Reports something to the bot owner(s).
* **restart:** Restarts the bot. (Owner-Only)
### Discord Information:
+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;
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "112.1.0",
"version": "112.2.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {