restart command

This commit is contained in:
Lukáš H 2020-04-22 17:43:23 +02:00
parent 7a3035e00b
commit 2f5534524d
No known key found for this signature in database
GPG key ID: E07D6630DBC17195

30
commands/restart.js Normal file
View file

@ -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);
};