1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-14 03:30:18 +00:00
musix-oss/commands/settings/permissions.js
MatteZ02 a64f9d2325 Update 3.0.3
All messages reworked.
2020-03-12 13:56:31 +02:00

17 lines
971 B
JavaScript

module.exports = {
name: 'permissions',
async execute(msg, args, client, Discord, prefix) {
if (!args[2]) return msg.channel.send(`${client.messages.permissions} \`${client.global.db.guilds[msg.guild.id].permissions}\``);
if (args[2] === 'true') {
if (!client.global.db.guilds[msg.guild.id].permissions) {
client.global.db.guilds[msg.guild.id].permissions = true;
msg.channel.send(client.messages.permissionsSetTrue);
} else return msg.channel.send(client.messages.permissionsTrue);
} else if (args[2] === 'false') {
if (client.global.db.guilds[msg.guild.id].permissions) {
client.global.db.guilds[msg.guild.id].permissions = false;
msg.channel.send(client.messages.permissionsSetFalse);
} else return msg.channel.send(client.messages.permissionsFalse);
} else return msg.channel.send(client.messages.boolean);
}
};