Removed reload command

This commit is contained in:
Dominik Korsa 2018-12-19 21:23:37 +01:00
parent 4b46d5795e
commit 9ac5808b5d

View file

@ -1,20 +0,0 @@
exports.run = (client, message, args) => {
if(!message.channel.permissionsFor(message.member).has("MANAGE_MESSAGES", false)){
message.channel.send("Nie masz permisji!")
return;
}
if(!args || args.size < 1) return message.reply("Podaj nazwe komendy!");
var commandName = args[0];
if(!client.commands.has(commandName)) {
return message.reply("Ta komenda nie istnieje!");
}
delete require.cache[require.resolve(`./${commandName}.js`)];
client.commands.delete(commandName);
var props = require(`./${commandName}.js`);
client.commands.set(commandName, props);
message.reply(`Komenda ${commandName} została ponownie załadowana.`);
};