@@ -9,28 +9,28 @@ module.exports = class BotListHandler {
9
9
async updateStats ( ) {
10
10
if ( this . client . user . id === "396323622953680910" ) {
11
11
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 ;
15
15
await post ( `https://discordbotlist.com/api/bots/${ this . client . user . id } /stats` )
16
16
. set ( "Authorization" , `Bot ${ process . env . DBLCOM } ` )
17
- . send ( { guilds : this . client . guilds . size , users : this . client . users . size } ) ;
17
+ . send ( { guilds : totalGuilds , users : totalUsers } ) ;
18
18
19
19
await post ( `https://botsfordiscord.com/api/bot/${ this . client . user . id } ` )
20
20
. set ( "Authorization" , process . env . BFDCOM )
21
- . send ( { server_count : this . client . guilds . size } ) ;
21
+ . send ( { server_count : totalGuilds } ) ;
22
22
23
23
await post ( `https://discordbots.org/api/bots/${ this . client . user . id } /stats` )
24
24
. 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 } ) ;
26
26
27
27
await post ( `https://bots.discord.pw/api/bots/${ this . client . user . id } /stats` )
28
28
. 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 } ) ;
30
30
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 ) ;
34
34
this . client . console . log ( "\u001b[43;30m[Submitted Stats.]" ) ;
35
35
} catch ( error ) {
36
36
this . client . console . log ( error ) ;
0 commit comments