mirror of
https://github.com/musix-org/musix-oss
synced 2025-07-07 01:20:48 +00:00
Fix code to work on this decade 1/x
This commit is contained in:
20
src/funcs/exe.js
Normal file
20
src/funcs/exe.js
Normal file
@ -0,0 +1,20 @@
|
||||
module.exports = function (msg, args, client, command) {
|
||||
const permissions = msg.channel.permissionsFor(client.user);
|
||||
if (!permissions.has("EMBED_LINKS"))
|
||||
return msg.channel.send(client.messages.noPermsEmbed);
|
||||
if (!permissions.has("USE_EXTERNAL_EMOJIS"))
|
||||
return msg.channel.send(client.messages.noPermsUseExternalEmojis);
|
||||
if (
|
||||
command.category === "music" &&
|
||||
client.global.db.guilds[msg.guild.id].blacklist.includes(msg.channel.id)
|
||||
)
|
||||
return msg.channel.send(client.messages.musicCommandsDisabled);
|
||||
try {
|
||||
command.uses++;
|
||||
command.execute(msg, args, client, command);
|
||||
} catch (error) {
|
||||
msg.reply(client.messages.errorExe);
|
||||
console.log(error.toString());
|
||||
console.log(error.stack.replace(/at /g, "**at **"));
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user