From d4b3304e4581d2cb21acd9ea351f5bee61c31494 Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Wed, 19 Feb 2020 11:24:26 +0200 Subject: [PATCH] Update ready.js --- events/ready.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/events/ready.js b/events/ready.js index df719f7d..3549f4f3 100644 --- a/events/ready.js +++ b/events/ready.js @@ -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,