1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-10 02:00:20 +00:00
musix-oss/funcs/exe.js

14 lines
617 B
JavaScript
Raw Permalink Normal View History

2024-02-09 09:53:30 +00:00
const { EmbedBuilder, PermissionFlagsBits } = require("discord.js");
module.exports = function (message, args, client, prefix, command) {
const permissions = message.channel.permissionsFor(message.client.user);
if (!permissions.has(PermissionFlagsBits.EmbedLinks)) return message.channel.send(':x: I cannot send embeds (Embed links), make sure I have the proper permissions!');
try {
command.uses++;
command.execute(message, args, client, prefix);
} catch (error) {
message.reply(`:x: there was an error trying to execute that command!`);
console.log(error);
}
};