Skip to content

Commit 10a972f

Browse files
committed
fix(bot): format status (closes #43)
1 parent fb6e6ba commit 10a972f

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/events/ready.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
1-
import { ActivityType, Events, PresenceUpdateStatus } from 'discord.js';
2-
import client from '../index';
3-
import fetchLatestUploads from '../utils/youtube/fetchLatestUploads';
4-
import { config } from '../config';
5-
import { checkIfStreamersAreLive } from '../utils/twitch/checkIfStreamerIsLive';
6-
import { updateBotInfo } from '../utils/database';
1+
import { ActivityType, Events, PresenceUpdateStatus } from "discord.js";
2+
3+
import client from "../index";
4+
import fetchLatestUploads from "../utils/youtube/fetchLatestUploads";
5+
import { config } from "../config";
6+
import { checkIfStreamersAreLive } from "../utils/twitch/checkIfStreamerIsLive";
7+
import { updateBotInfo } from "../utils/database";
78

89
// update the bot's presence
910
async function updatePresence() {
1011
if (!client?.user) return;
1112

1213
const servers = client.guilds.cache.size;
13-
const members = client.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)
14+
const members = client.guilds.cache.reduce(
15+
(acc, guild) => acc + guild.memberCount,
16+
0,
17+
);
1418

1519
await updateBotInfo(servers, members);
1620
client.user.setPresence({
1721
activities: [
1822
{
19-
name: `Notifying ${servers} servers [${members} members]`,
23+
name: `Notifying ${servers.toLocaleString()} servers [${members.toLocaleString()} members]`,
2024
type: ActivityType.Custom,
2125
},
2226
],
2327
status: PresenceUpdateStatus.Online,
2428
});
25-
2629
}
2730

2831
// Log into the bot

0 commit comments

Comments
 (0)