From 2f5534524d6368153f5d410890a38230650c29c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20H?= Date: Wed, 22 Apr 2020 17:43:23 +0200 Subject: [PATCH] restart command --- commands/restart.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 commands/restart.js diff --git a/commands/restart.js b/commands/restart.js new file mode 100644 index 0000000..6eab30f --- /dev/null +++ b/commands/restart.js @@ -0,0 +1,30 @@ +exports.conf = { + enabled: true, + guildOnly: false, + aliases: [], + permLevel: 'Developer', + requiredPerms: [], + cooldown: 2000 +} + +exports.help = { + name: 'restart', + category: 'Developer', + description: 'Restarts the bot.', + usage: 'restart', + parameters: '' +} + +exports.run = async (client, message) => {// eslint-disable-line no-unused-vars + // This actually shuts down the bot, you'll need to use something like pm2 to get it to restart + + await message.channel.send("<:reboot:467216876938985482> Restarting..."); + + /* + client.commands.forEach( async cmd => { + await client.unloadCommand(cmd); + }); + */ + + process.exit(1); +}; \ No newline at end of file