2019-09-13 20:02:41 +00:00
|
|
|
const handler = require("../utils/handler.js");
|
|
|
|
|
|
|
|
exports.run = async (message, args) => {
|
2019-11-13 00:09:06 +00:00
|
|
|
if (message.author.id !== process.env.OWNER) return `${message.author.mention}, only the bot owner can reload commands!`;
|
2019-09-13 20:02:41 +00:00
|
|
|
if (args.length === 0) return `${message.author.mention}, you need to provide a command to reload!`;
|
|
|
|
try {
|
|
|
|
await handler.unload(args[0]);
|
|
|
|
await handler.load(args[0]);
|
|
|
|
return `${message.author.mention}, the command \`${args[0]}\` has been reloaded.`;
|
|
|
|
} catch (error) {
|
|
|
|
if (error) console.error;
|
|
|
|
}
|
2019-12-02 20:47:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
exports.category = 7;
|
2019-12-05 16:58:46 +00:00
|
|
|
exports.help = "Reloads a command";
|
|
|
|
exports.params = "[command]";
|