1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-22 21:13:18 +00:00

Update ready.js

This commit is contained in:
MatteZ02 2019-11-11 15:55:32 +02:00
parent 67bc85b47e
commit 89d010e2e5

View File

@ -14,25 +14,18 @@ module.exports = {
client.user.setStatus('dnd');
dbl.postStats(client.guilds.size);
console.log('- Activated -');
let users = 0;
client.guilds.forEach(guild => {
users += guild.memberCount;
});
let status = [`${users} users on ${client.guilds.size} guilds!`, `@${client.user.username} help | 🎶`];
let status = [`${client.guilds.size} guilds!`, `@${client.user.username} help | 🎶`];
let i = 0;
setInterval(() => {
if (i == status.length) {
i = 0;
}
client.guilds.forEach(guild => {
users += guild.memberCount;
});
status = [`${users} users on ${client.guilds.size} guilds!`, `@${client.user.username} help | 🎶`];
client.user.setActivity(status[i], { type: 'LISTENING' });
i++;
users = 0;
}, 30000);
setInterval(async () => {
client.guilds.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,
@ -48,6 +41,7 @@ module.exports = {
saved: client.global.db.playlists[guild.id].saved,
});
}
});
dbl.postStats(client.guilds.size);
}, 1800000);
}