1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-23 16:13:18 +00:00
musix-oss/commands/settings/permissions.js

17 lines
971 B
JavaScript
Raw Normal View History

2020-02-05 20:02:53 +00:00
module.exports = {
name: 'permissions',
async execute(msg, args, client, Discord, prefix) {
2020-03-12 11:56:31 +00:00
if (!args[2]) return msg.channel.send(`${client.messages.permissions} \`${client.global.db.guilds[msg.guild.id].permissions}\``);
2020-02-05 20:02:53 +00:00
if (args[2] === 'true') {
if (!client.global.db.guilds[msg.guild.id].permissions) {
client.global.db.guilds[msg.guild.id].permissions = true;
2020-03-12 11:56:31 +00:00
msg.channel.send(client.messages.permissionsSetTrue);
} else return msg.channel.send(client.messages.permissionsTrue);
2020-02-05 20:02:53 +00:00
} else if (args[2] === 'false') {
if (client.global.db.guilds[msg.guild.id].permissions) {
client.global.db.guilds[msg.guild.id].permissions = false;
2020-03-12 11:56:31 +00:00
msg.channel.send(client.messages.permissionsSetFalse);
} else return msg.channel.send(client.messages.permissionsFalse);
} else return msg.channel.send(client.messages.boolean);
2020-02-05 20:02:53 +00:00
}
};