1
0
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:
Christer Warén
2024-02-10 09:33:59 +02:00
parent 99ecd9787d
commit 86b4676159
61 changed files with 3842 additions and 471 deletions

20
src/funcs/exe.js Normal file
View 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 **"));
}
};