1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-23 03:33:17 +00:00

Update ready.js

This commit is contained in:
MatteZ02 2019-10-22 18:40:42 +03:00
parent ad67d626e8
commit 9b71cc6efe

View File

@ -14,7 +14,11 @@ module.exports = {
client.user.setStatus('dnd'); client.user.setStatus('dnd');
dbl.postStats(client.guilds.size); dbl.postStats(client.guilds.size);
console.log('- Activated -'); console.log('- Activated -');
let status = [`${client.users.size} users on ${client.guilds.size} guilds!`, '@musix help | 🎶']; let users = 0;
client.guilds.forEach(guild => {
users += guild.memberCount;
})
let status = [`${users} users on ${client.guilds.size} guilds!`, '@musix help | 🎶'];
let i = 0; let i = 0;
setInterval(() => { setInterval(() => {
if (i == status.length) { if (i == status.length) {
@ -22,7 +26,7 @@ module.exports = {
} }
client.user.setActivity(status[i], { type: 'LISTENING' }); client.user.setActivity(status[i], { type: 'LISTENING' });
i++; i++;
}, 30000); }, 3000);
setInterval(async () => { setInterval(async () => {
client.guilds.forEach(guild => { client.guilds.forEach(guild => {
client.db.collection('guilds').doc(guild.id).set({ client.db.collection('guilds').doc(guild.id).set({