diff --git a/commands/restart.js b/commands/restart.js new file mode 100644 index 0000000..28032f0 --- /dev/null +++ b/commands/restart.js @@ -0,0 +1,13 @@ +module.exports = { + name: "restart", + description: "Shuts down the bot. If running under PM2, bot will restart automatically.", + permission: 'ADMINISTRATOR', + args: true, + async (message, args, client) => { + await message.reply("Bot is restarting"); + await Promise.all(client.commands.map(cmd => + client.unloadCommand(cmd) + )); + process.exit(0); +}; +}; \ No newline at end of file