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

Fix for the database error

This commit is contained in:
MatteZ02 2019-10-11 18:50:22 +03:00
parent 873f0c8e1e
commit fb8ae3cf35
2 changed files with 5 additions and 4 deletions

View File

@ -11,7 +11,11 @@ module.exports = {
console.log('- Activated -'); console.log('- Activated -');
setInterval(async () => { setInterval(async () => {
client.guilds.forEach(guild => { 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); dbl.postStats(client.guilds.size);
}, 1200000); }, 1200000);

View File

@ -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)); const event = client.events.get(eventName) || client.events.find(ent => ent.aliases && ent.aliases.includes(eventName));
event.execute(client, guild); event.execute(client, guild);
}); });
dbl.on('posted', () => {
console.log('erver count posted!');
})
dbl.on('error', error => { dbl.on('error', error => {
console.log(`Error with DBL! ${error}`); console.log(`Error with DBL! ${error}`);