1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-07-07 04:20:49 +00:00

update 3.0.5

This commit is contained in:
MatteZ02
2020-03-24 12:02:07 +02:00
parent 11cea679d1
commit e20d0e18e0
61 changed files with 81 additions and 109 deletions

View File

@ -1,28 +0,0 @@
module.exports = {
name: 'setdj',
async execute(msg, args, client) {
if (!client.global.db.guilds[msg.guild.id].dj) {
if (!client.global.db.guilds[msg.guild.id].permissions) {
client.global.db.guilds[msg.guild.id].permissions = true;
}
if (msg.guild.roles.cache.find(x => x.name === "DJ")) {
client.global.db.guilds[msg.guild.id].djrole = msg.guild.roles.cache.find(x => x.name === "DJ").id;
msg.channel.send(client.messages.djRoleFound);
client.global.db.guilds[msg.guild.id].dj = true;
} else {
const permissions = msg.channel.permissionsFor(msg.client.user);
if (!permissions.has('MANAGE_ROLES')) return msg.channel.send(client.messages.noPermsManageRoles);
msg.guild.createRole({
name: 'DJ',
})
.then(role => client.global.db.guilds[msg.guild.id].djrole = role.id)
.catch(console.error)
client.global.db.guilds[msg.guild.id].dj = true;
msg.channel.send(client.messages.djRoleCreated);
}
} else {
client.global.db.guilds[msg.guild.id].dj = false;
msg.channel.send(client.messages.djFalse);
}
}
};