From fb8ae3cf355519f5e19cdb24401ec7c6ae19e0b5 Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Fri, 11 Oct 2019 18:50:22 +0300 Subject: [PATCH] Fix for the database error --- events/ready.js | 6 +++++- index.js | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/events/ready.js b/events/ready.js index ef2ca674..f581addf 100644 --- a/events/ready.js +++ b/events/ready.js @@ -11,7 +11,11 @@ module.exports = { console.log('- Activated -'); setInterval(async () => { client.guilds.forEach(guild => { - client.db.collection('guilds').doc(guild.id).set(client.global.db.guilds[guild.id]); + client.db.collection('guilds').doc(guild.id).set({ + prefix: client.global.db.guilds[guild.id].prefix, + defaultVolume: client.global.db.guilds[guild.id].defaultVolume, + permissions: client.global.db.guilds[guild.id].permissions, + }); }); dbl.postStats(client.guilds.size); }, 1200000); diff --git a/index.js b/index.js index 9a776389..7790b1f1 100644 --- a/index.js +++ b/index.js @@ -67,9 +67,6 @@ client.on('guildCreate', async (guild) => { const event = client.events.get(eventName) || client.events.find(ent => ent.aliases && ent.aliases.includes(eventName)); event.execute(client, guild); }); -dbl.on('posted', () => { - console.log('erver count posted!'); -}) dbl.on('error', error => { console.log(`Error with DBL! ${error}`);