mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Restart Command
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "112.1.0",
|
||||
"version": "112.2.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user