Partial rewrite

This commit is contained in:
MatteZ02
2020-03-12 11:59:05 +02:00
committed by Christer Warén
parent b275e28abe
commit 695c5a1e40
11 changed files with 113 additions and 115 deletions

View File

@ -9,6 +9,14 @@ module.exports = {
const commandName = args[0].toLowerCase();
const command = client.commands.get(commandName) || client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(commandName)) || client.commandAliases.get(commandName);
if (!command && msg.content !== `${prefix}`) return;
client.funcs.exe(msg, args, client, Discord, prefix, command);
const permissions = msg.channel.permissionsFor(msg.client.user);
if (!permissions.has('EMBED_LINKS')) return msg.channel.send('I cannot send embeds (Embed links).');
try {
command.uses++;
command.execute(msg, args, client, Discord, prefix, command);
} catch (error) {
msg.reply(`Error!`);
console.error(error);
}
}
}