13 lines
553 B
JavaScript
13 lines
553 B
JavaScript
|
const handler = require("../utils/handler.js");
|
||
|
|
||
|
exports.run = async (message, args) => {
|
||
|
if (message.author.id !== require("../config.json").botOwner) return `${message.author.mention}, only the bot owner can reload commands!`;
|
||
|
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;
|
||
|
}
|
||
|
};
|