diff --git a/README.md b/README.md index 3043c062..562bb853 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/commands/util/restart.js b/commands/util/restart.js new file mode 100644 index 00000000..f91538e1 --- /dev/null +++ b/commands/util/restart.js @@ -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; + } +}; diff --git a/package.json b/package.json index 400fba42..5216fd4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "112.1.0", + "version": "112.2.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {