woomy/commands/restart.js

31 lines
645 B
JavaScript
Raw Normal View History

2020-04-22 15:43:23 +00:00
exports.conf = {
2020-04-24 19:06:17 +00:00
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 'Developer',
requiredPerms: [],
cooldown: 2000
2020-04-22 15:43:23 +00:00
}
exports.help = {
2020-04-24 19:06:17 +00:00
name: 'restart',
category: 'Developer',
description: 'Restarts the bot.',
usage: 'restart',
parameters: ''
2020-04-22 15:43:23 +00:00
}
2020-04-24 19:06:17 +00:00
exports.run = async (client, message) => { // eslint-disable-line no-unused-vars
2020-04-22 15:43:23 +00:00
// This actually shuts down the bot, you'll need to use something like pm2 to get it to restart
2020-04-24 19:06:17 +00:00
await message.channel.send('<:reboot:467216876938985482> Restarting...')
2020-04-22 15:43:23 +00:00
/*
client.commands.forEach( async cmd => {
await client.unloadCommand(cmd);
});
*/
2020-04-24 19:06:17 +00:00
process.exit(1)
}