Skip to content

Commit b4d4ed1

Browse files
committed
fix guild count
1 parent a9bebc5 commit b4d4ed1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/events/clientReady.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ const clientReady = async function(client){
2020
const dblHandler = new DblHandler(client);
2121
Log.done("Client is ready!");
2222

23-
const guildCount = await client.guilds.fetch().then(guilds => guilds.size);
23+
const guilds = await client.cluster?.fetchClientValues("guilds.cache.size");
24+
const guildCount = guilds?.reduce((acc, gc) => Number(acc) + Number(gc), 0);
25+
2426
Log.info("Logged in as '" + client.user?.tag + "'! Serving in " + guildCount + " servers.");
2527

2628
await registerCommands(client)

src/util/setStatus.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { ActivityType } from "discord.js";
1111
* @param {number} count
1212
*/
1313
const setStatus = async function(client, count){
14-
client.user?.setActivity({ name: `Counting on ${count} servers!`, type: ActivityType.Playing });
14+
client.user?.setActivity({ name: `Counting on ${count}+ servers!`, type: ActivityType.Playing });
1515
client.user?.setStatus("online");
1616
};
1717

0 commit comments

Comments
 (0)