mirror of
https://github.com/musix-org/musix-oss
synced 2025-08-02 12:24:35 +00:00
Option handler for playlists and settings. Exe function to execute command files. Command aliases updated.
This commit is contained in:
17
commands/settings/permissions.js
Normal file
17
commands/settings/permissions.js
Normal file
@@ -0,0 +1,17 @@
|
||||
module.exports = {
|
||||
name: 'permissions',
|
||||
async execute(message, args, client, Discord, prefix) {
|
||||
if (!args[2]) return message.channel.send(`🔒 Permission requirement: \`${client.global.db.guilds[message.guild.id].permissions}\``);
|
||||
if (args[2] === 'true') {
|
||||
if (!client.global.db.guilds[message.guild.id].permissions) {
|
||||
client.global.db.guilds[message.guild.id].permissions = true;
|
||||
message.channel.send(`:white_check_mark: Permissions requirement now set to: \`true\``);
|
||||
} else return message.channel.send(':x: That value is already `true`!');
|
||||
} else if (args[2] === 'false') {
|
||||
if (client.global.db.guilds[message.guild.id].permissions) {
|
||||
client.global.db.guilds[message.guild.id].permissions = false;
|
||||
message.channel.send(`:white_check_mark: Permissions requirement now set to: \`false\``);
|
||||
} else return message.channel.send(':x: That value is already `false`!');
|
||||
} else return message.channel.send(':x: Please define a boolean! (true/false)');
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user