woomy/src/commands/restart.js

28 lines
599 B
JavaScript
Raw Normal View History

2020-01-25 10:02:43 +00:00
exports.run = async (client, message) => {// eslint-disable-line no-unused-vars
2020-03-09 01:11:33 +00:00
// This actually shuts down the bot, you'll need to use something like pm2 to get it to restart
2020-01-25 10:02:43 +00:00
await message.channel.send("<:reboot:467216876938985482> Restarting...");
2020-03-09 01:11:33 +00:00
2020-01-25 10:02:43 +00:00
client.commands.forEach( async cmd => {
await client.unloadCommand(cmd);
});
2020-03-09 01:11:33 +00:00
process.exit();
2020-01-25 10:02:43 +00:00
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "Developer",
requiredPerms: []
};
exports.help = {
name: "restart",
category: "Owner",
description: "Restarts the bot.",
usage: "restart"
};