1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-22 21:13:18 +00:00

Update settings.js

This commit is contained in:
MatteZ02 2019-10-12 18:23:18 +03:00
parent d096810907
commit af5e40975c

View File

@ -32,12 +32,33 @@ module.exports = {
} 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:')
if (args[2]) {
const guild = client.guilds.get(args[2]);
if (!client.global.db.guilds[guild.id].premium) {
client.global.db.playlists[guild.id] = {
songs: [],
firstSong: undefined,
saved: false,
};
client.global.db.guilds[guild.id].premium = true;
message.channel.send(`:white_check_mark: Guild ${guild.name} | ${guild.id} is now premium! :party~1:`)
} else {
client.global.db.guilds[guild.id].premium = false;
message.channel.send(`:white_check_mark: Guild ${guild.name} | ${guild.id} is no longer premium!`)
}
} else {
client.global.db.guilds[message.guild.id].premium = false;
message.channel.send(":white_check_mark: This guild is no longer premium!")
if (!client.global.db.guilds[message.guild.id].premium) {
client.global.db.playlists[message.guild.id] = {
songs: [],
firstSong: undefined,
saved: false,
};
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()