mirror of
https://github.com/musix-org/musix-oss
synced 2024-11-10 02:00:20 +00:00
Addition to the playlists
This commit is contained in:
parent
ff2845c6cb
commit
c716867b8d
@ -4,7 +4,11 @@ module.exports = {
|
||||
description: 'Save and load queues',
|
||||
cooldown: 10,
|
||||
async execute(message, args, client, Discord, prefix) {
|
||||
const permissions = message.channel.permissionsFor(message.author);
|
||||
const serverQueue = client.queue.get(message.guild.id);
|
||||
if (message.author.id !== '360363051792203779') {
|
||||
if (!permissions.has('MANAGE_GUILD')) return message.channel.send(':x: You need the `MANAGE_SERVER` permission to modify the playlist!');
|
||||
}
|
||||
if (client.global.db.guilds[message.guild.id].premium) {
|
||||
if (args[1] === 'play') {
|
||||
if (client.global.db.playlists[message.guild.id].saved) {
|
||||
|
@ -31,6 +31,14 @@ module.exports = {
|
||||
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)');
|
||||
} else if (args[1] === 'setPremium' && message.author.id === '360363051792203779') {
|
||||
if (!client.global.db.guilds[message.guild.id].premium) {
|
||||
client.global.db.guilds[message.guild.id].premium = true;
|
||||
message.channel.send(':white_check_mark: This guild is now premium! :party~1:')
|
||||
} else {
|
||||
client.global.db.guilds[message.guild.id].premium = false;
|
||||
message.channel.send(":white_check_mark: This guild is no longer premium!")
|
||||
}
|
||||
} else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setTitle('Guild settings for Musix')
|
||||
|
@ -5,11 +5,13 @@ module.exports = {
|
||||
prefix: '>',
|
||||
defaultVolume: 5,
|
||||
permissions: false,
|
||||
premium: false,
|
||||
});
|
||||
client.global.db.guilds[guild.id] = {
|
||||
prefix: ">",
|
||||
defaultVolume: 5,
|
||||
permissions: false,
|
||||
premium: false,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ module.exports = {
|
||||
prefix: client.global.db.guilds[guild.id].prefix,
|
||||
defaultVolume: client.global.db.guilds[guild.id].defaultVolume,
|
||||
permissions: client.global.db.guilds[guild.id].permissions,
|
||||
premium: client.global.db.guilds[guild.id].premium,
|
||||
});
|
||||
if (client.global.db.guilds[guild.id].premium) {
|
||||
client.db.collection('playlists').doc(guild.id).set({
|
||||
|
Loading…
Reference in New Issue
Block a user