1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-08-01 17:44:35 +00:00
This commit is contained in:
MatteZ02
2019-10-11 11:48:50 +03:00
parent b3a83f3cf0
commit feea924d92
14 changed files with 38 additions and 43 deletions

View File

@@ -9,7 +9,7 @@ module.exports = {
if (serverQueue) {
if (message.author.id !== '360363051792203779') {
if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voiceChannel as Musix to loop the queue!');
if (client.global.db.musix_guilds[message.guild.id].permissions === true) {
if (client.global.db.guilds[message.guild.id].permissions === true) {
if (!permissions.has('MANAGE_MESSAGES')) return message.channel.send(':x: You need the `MANAGE_MESSAGES` permission to loop the queue!');
}
}

View File

@@ -9,7 +9,7 @@ module.exports = {
if (serverQueue && serverQueue.playing === true) {
if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voiceChannel as Musix to pause the music!');
if (message.author.id !== '360363051792203779') {
if (client.global.db.musix_guilds[message.guild.id].permissions === true) {
if (client.global.db.guilds[message.guild.id].permissions === true) {
if (!permissions.has('MANAGE_MESSAGES')) return message.channel.send(':x: You need the `MANAGE_MESSAGES` permission to pause the music!');
}
}

View File

@@ -9,7 +9,7 @@ module.exports = {
if (serverQueue && !serverQueue.playing) {
if (message.author.id !== '360363051792203779') {
if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voiceChannel as Musix to loop the queue!');
if (client.global.db.musix_guilds[message.guild.id].permissions === true) {
if (client.global.db.guilds[message.guild.id].permissions === true) {
if (!permissions.has('MANAGE_MESSAGES')) return message.channel.send(':x: You need the `MANAGE_MESSAGES` permission to resume the music!');
}
}

View File

@@ -12,7 +12,7 @@ module.exports = {
if (message.author.id !== '360363051792203779') {
return message.channel.send(':x: This command is currently disabled!');
if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voiceChannel as Musix to seek the song!');
if (client.global.db.musix_guilds[message.guild.id].permissions === true) {
if (client.global.db.guilds[message.guild.id].permissions === true) {
if (!permissions.has('MANAGE_MESSAGES')) return message.channel.send(':x: You need the `MANAGE_MESSAGES` permission to seek the song!');
}
}

View File

@@ -9,25 +9,25 @@ module.exports = {
if (!permissions.has('MANAGE_GUILD')) return message.channel.send(':x: You need the `MANAGE_SERVER` permission to change the settings!');
}
if (args[1] === 'prefix') {
if (!args[2]) return message.channel.send(`<:thonk:461691390972264449> Current prefix: \`${client.global.db.musix_guilds[message.guild.id].musix_prefix}\``);
client.global.db.musix_guilds[message.guild.id].musix_prefix = args[2];
if (!args[2]) return message.channel.send(`<:thonk:461691390972264449> Current prefix: \`${client.global.db.guilds[message.guild.id].prefix}\``);
client.global.db.guilds[message.guild.id].prefix = args[2];
message.channel.send(`:white_check_mark: New prefix set to: \`${args[2]}\``);
} else if (args[1] === 'volume') {
if (!args[2]) return message.channel.send(`:speaker: Current default volume is: \`${client.global.db.musix_guilds[message.guild.id].defaultVolume}\``);
if (!args[2]) return message.channel.send(`:speaker: Current default volume is: \`${client.global.db.guilds[message.guild.id].defaultVolume}\``);
if (isNaN(args[2])) return message.channel.send(':x: I\'m sorry, But the default volume needs to be a valid __number__.');
if (args[2].length > 2) return message.channel.send(':x: The default volume must be below `100` for quality and safety resons.');
client.global.db.musix_guilds[message.guild.id].defaultVolume = args[2];
client.global.db.guilds[message.guild.id].defaultVolume = args[2];
message.channel.send(`:white_check_mark: Default volume set to: \`${args[2]}\``);
} else if (args[1] === 'permissions') {
if (!args[2]) return message.channel.send(`🔒 Permission requirement: \`${client.global.db.musix_guilds[message.guild.id].permissions}\``);
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.musix_guilds[message.guild.id].permissions === false) {
client.global.db.musix_guilds[message.guild.id].permissions = true;
if (client.global.db.guilds[message.guild.id].permissions === false) {
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.musix_guilds[message.guild.id].permissions === true) {
client.global.db.musix_guilds[message.guild.id].permissions = false;
if (client.global.db.guilds[message.guild.id].permissions === true) {
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)');

View File

@@ -9,7 +9,7 @@ module.exports = {
if (!serverQueue) return message.channel.send(':x: There is nothing playing that I could skip for you.');
if (message.author.id !== '360363051792203779') {
if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voiceChannel as Musix to skip the song!');
if (client.global.db.musix_guilds[message.guild.id].permissions === true) {
if (client.global.db.guilds[message.guild.id].permissions === true) {
if (!permissions.has('MANAGE_MESSAGES')) return message.channel.send(':x: You need the `MANAGE_MESSAGES` permission to skip songs!');
}
}

View File

@@ -9,7 +9,7 @@ module.exports = {
if (!serverQueue) return message.channel.send(':x: There is nothing playing that I could stop for you.');
if (message.author.id !== '360363051792203779') {
if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voiceChannel as Musix to stop the music!');
if (client.global.db.musix_guilds[message.guild.id].permissions === true) {
if (client.global.db.guilds[message.guild.id].permissions === true) {
if (!permissions.has('MANAGE_CHANNELS')) return message.channel.send(':x: You need the `MANAGE_CHANNELS` permission to stop the music!');
}
}

View File

@@ -11,7 +11,7 @@ module.exports = {
if (!args[1]) return message.channel.send(`:loud_sound: The current volume is: **${serverQueue.volume}**`);
if (message.author.id !== '360363051792203779') {
if (!voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in a voice channel to change the volume!');
if (client.global.db.musix_guilds[message.guild.id].permissions === true) {
if (client.global.db.guilds[message.guild.id].permissions === true) {
if (!permissions.has('MANAGE_CHANNELS')) return message.channel.send(':x: You need the `MANAGE_CHANNELS` permission to change the volume!');
}
if (isNaN(args[1])) return message.channel.send(':x: I\'m sorry, But you need to enter a valid __number__.');