eximiabots-radiox/struct/funcs/exe.js

12 lines
442 B
JavaScript
Raw Normal View History

2020-03-02 19:38:42 +00:00
module.exports = function (msg, args, client, Discord, prefix, command) {
const permissions = msg.channel.permissionsFor(msg.client.user);
2020-03-12 00:50:05 +00:00
if (!permissions.has('EMBED_LINKS')) return msg.channel.send('I cannot send embeds (Embed links).');
2020-03-02 19:38:42 +00:00
try {
command.uses++;
command.execute(msg, args, client, Discord, prefix, command);
} catch (error) {
2020-03-12 00:50:05 +00:00
msg.reply(`Error!`);
2020-03-02 19:38:42 +00:00
console.error(error);
}
};