Skip to content
This repository was archived by the owner on Sep 23, 2019. It is now read-only.

Commit 023e099

Browse files
committed
tweaks
1 parent 6163c56 commit 023e099

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

util/botStatsHandler.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,28 @@ module.exports = class BotListHandler {
99
async updateStats() {
1010
if (this.client.user.id === "396323622953680910") {
1111
try {
12-
const users = this.client.users.size;
13-
const shards = this.client.ws.shards.length;
14-
const guilds = this.client.guilds.size;
12+
const totalUsers = this.client.users.size;
13+
const totalShards = this.client.ws.shards.length;
14+
const totalGuilds = this.client.guilds.size;
1515
await post(`https://discordbotlist.com/api/bots/${this.client.user.id}/stats`)
1616
.set("Authorization", `Bot ${process.env.DBLCOM}`)
17-
.send({ guilds: this.client.guilds.size, users: this.client.users.size });
17+
.send({ guilds: totalGuilds, users: totalUsers });
1818

1919
await post(`https://botsfordiscord.com/api/bot/${this.client.user.id}`)
2020
.set("Authorization", process.env.BFDCOM)
21-
.send({ server_count: this.client.guilds.size });
21+
.send({ server_count: totalGuilds });
2222

2323
await post(`https://discordbots.org/api/bots/${this.client.user.id}/stats`)
2424
.set("Authorization", process.env.DBLORG)
25-
.send({ server_count: this.client.guilds.size, shard_count: this.client.ws.shards.length });
25+
.send({ server_count: totalGuilds, shard_count: totalShards });
2626

2727
await post(`https://bots.discord.pw/api/bots/${this.client.user.id}/stats`)
2828
.set("Authorization", process.env.DISCPW)
29-
.send({ server_count: this.client.guilds.size, shard_count: this.client.ws.shards.length });
29+
.send({ server_count: totalGuilds, shard_count: totalShards });
3030

31-
this.client.dogstats.gauge("misaki.users", users);
32-
this.client.dogstats.gauge("misaki.guilds", guilds);
33-
this.client.dogstats.gauge("misaki.shards", shards);
31+
this.client.dogstats.gauge("misaki.totalUsers", totalUsers);
32+
this.client.dogstats.gauge("misaki.totalGuilds", totalGuilds);
33+
this.client.dogstats.gauge("misaki.totalShards", totalShards);
3434
this.client.console.log("\u001b[43;30m[Submitted Stats.]");
3535
} catch (error) {
3636
this.client.console.log(error);

0 commit comments

Comments
 (0)