1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-10 05:10:17 +00:00

Update ready.js

This commit is contained in:
MatteZ02 2020-02-19 11:24:26 +02:00
parent 8e929f2c1f
commit d4b3304e45

View File

@ -8,7 +8,7 @@ module.exports = {
client.global.db.guilds[guildData.id] = guildData.d;
});
if (client.devMode) {
client.guilds.forEach(guild => {
client.guilds.cache.forEach(guild => {
client.global.db.guilds[guild.id] = {
prefix: client.config.prefix,
defaultVolume: client.config.defaultVolume,
@ -33,7 +33,7 @@ module.exports = {
setInterval(async () => {
if (client.config.saveDB && !client.config.devMode) {
console.log('DB saved');
client.guilds.forEach(guild => {
client.guilds.cache.forEach(guild => {
client.db.collection('guilds').doc(guild.id).set({
prefix: client.global.db.guilds[guild.id].prefix,
defaultVolume: client.global.db.guilds[guild.id].defaultVolume,