1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-23 06:43:17 +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: That value is already `false`!');
} else return message.channel.send(':x: Please define a boolean! (true/false)'); } else return message.channel.send(':x: Please define a boolean! (true/false)');
} else if (args[1] === 'setPremium' && message.author.id === '360363051792203779') { } else if (args[1] === 'setPremium' && message.author.id === '360363051792203779') {
if (!client.global.db.guilds[message.guild.id].premium) { if (args[2]) {
client.global.db.guilds[message.guild.id].premium = true; const guild = client.guilds.get(args[2]);
message.channel.send(':white_check_mark: This guild is now premium! :party~1:') 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 { } else {
client.global.db.guilds[message.guild.id].premium = false; if (!client.global.db.guilds[message.guild.id].premium) {
message.channel.send(":white_check_mark: This guild is no longer 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 { } else {
const embed = new Discord.RichEmbed() const embed = new Discord.RichEmbed()