Partial rewrite

This commit is contained in:
MatteZ02 authored and Christer Warén committed 2020-04-04 07:32:24 +03:00
1 parent b275e28abe
commit 695c5a1e40
11 files changed
+113 -115

No files matched your search

+9 -1
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);
}
}
}