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:
parent
67bc85b47e
commit
89d010e2e5
@ -14,40 +14,34 @@ 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 users = 0;
|
let status = [`${client.guilds.size} guilds!`, `@${client.user.username} help | 🎶`];
|
||||||
client.guilds.forEach(guild => {
|
|
||||||
users += guild.memberCount;
|
|
||||||
});
|
|
||||||
let status = [`${users} users on ${client.guilds.size} guilds!`, `@${client.user.username} help | 🎶`];
|
|
||||||
let i = 0;
|
let i = 0;
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
if (i == status.length) {
|
if (i == status.length) {
|
||||||
i = 0;
|
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' });
|
client.user.setActivity(status[i], { type: 'LISTENING' });
|
||||||
i++;
|
i++;
|
||||||
users = 0;
|
users = 0;
|
||||||
}, 30000);
|
}, 30000);
|
||||||
setInterval(async () => {
|
setInterval(async () => {
|
||||||
client.db.collection('guilds').doc(guild.id).set({
|
client.guilds.forEach(guild => {
|
||||||
prefix: client.global.db.guilds[guild.id].prefix,
|
client.db.collection('guilds').doc(guild.id).set({
|
||||||
defaultVolume: client.global.db.guilds[guild.id].defaultVolume,
|
prefix: client.global.db.guilds[guild.id].prefix,
|
||||||
permissions: client.global.db.guilds[guild.id].permissions,
|
defaultVolume: client.global.db.guilds[guild.id].defaultVolume,
|
||||||
premium: client.global.db.guilds[guild.id].premium,
|
permissions: client.global.db.guilds[guild.id].permissions,
|
||||||
dj: client.global.db.guilds[guild.id].dj,
|
premium: client.global.db.guilds[guild.id].premium,
|
||||||
djrole: client.global.db.guilds[guild.id].djrole,
|
dj: client.global.db.guilds[guild.id].dj,
|
||||||
startPlaying: client.global.db.guilds[guild.id].startPlaying
|
djrole: client.global.db.guilds[guild.id].djrole,
|
||||||
});
|
startPlaying: client.global.db.guilds[guild.id].startPlaying
|
||||||
if (client.global.db.guilds[guild.id].premium) {
|
|
||||||
client.db.collection('playlists').doc(guild.id).set({
|
|
||||||
songs: client.global.db.playlists[guild.id].songs,
|
|
||||||
saved: client.global.db.playlists[guild.id].saved,
|
|
||||||
});
|
});
|
||||||
}
|
if (client.global.db.guilds[guild.id].premium) {
|
||||||
|
client.db.collection('playlists').doc(guild.id).set({
|
||||||
|
songs: client.global.db.playlists[guild.id].songs,
|
||||||
|
saved: client.global.db.playlists[guild.id].saved,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
dbl.postStats(client.guilds.size);
|
dbl.postStats(client.guilds.size);
|
||||||
}, 1800000);
|
}, 1800000);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user