@@ -25,7 +25,7 @@ class InfoCommand extends Command {
25
25
} ,
26
26
} ;
27
27
28
- const data : { status : string ; id : number ; cluster : number } [ ] [ ] = await this . bot . cluster . broadcastEval (
28
+ const shardData : { status : string ; id : number ; cluster : number } [ ] [ ] = await this . bot . cluster . broadcastEval (
29
29
"this.shards.map(x => { return { status: x.status, id: x.id, cluster: this.cluster.id } })"
30
30
) ;
31
31
@@ -47,17 +47,23 @@ class InfoCommand extends Command {
47
47
} ,
48
48
{
49
49
name : ":tools: Servers" ,
50
- value : "```" + this . client . guilds . size + "```" ,
50
+ value : "```" + ( await this . bot . cluster . fetchClientValues ( " guilds.size" ) ) . reduce ( ( a , b ) => a + b , 0 ) + "```" ,
51
51
inline : true ,
52
52
} ,
53
53
{
54
54
name : ":busts_in_silhouette: Members" ,
55
- value : "```" + this . client . guilds . map ( g => g . memberCount ) . reduce ( ( a : number , b : number ) => a + b , 0 ) + "```" ,
55
+ value : "```" + ( await this . bot . cluster . fetchClientValues ( "users.size" ) ) . reduce ( ( a , b ) => a + b , 0 ) + "```" ,
56
56
inline : true ,
57
57
} ,
58
58
{
59
59
name : "<:channel:1026072967794413580> Channels" ,
60
- value : "```" + Object . keys ( this . client . channelGuildMap ) . length + "```" ,
60
+ value :
61
+ "```" +
62
+ ( await this . bot . cluster . broadcastEval ( "Object.keys(this.channelGuildMap).length" ) ) . reduce (
63
+ ( a , b ) => a + b ,
64
+ 0
65
+ ) +
66
+ "```" ,
61
67
inline : true ,
62
68
} ,
63
69
{
@@ -73,13 +79,13 @@ class InfoCommand extends Command {
73
79
this . client . shards . filter ( x => x . status === "ready" || x . status === "resuming" ) . length
74
80
} ` +
75
81
`\n` +
76
- `All Clusters: ${ data . map ( x => x . length ) . reduce ( ( a , b ) => a + b , 0 ) } ` +
82
+ `All Clusters: ${ shardData . map ( x => x . length ) . reduce ( ( a , b ) => a + b , 0 ) } ` +
77
83
` ` +
78
- `Online: ${ data . map ( x => x . filter ( y => y . status === "ready" ) . length ) . reduce ( ( a , b ) => a + b , 0 ) } ` +
84
+ `Online: ${ shardData . map ( x => x . filter ( y => y . status === "ready" ) . length ) . reduce ( ( a , b ) => a + b , 0 ) } ` +
79
85
` ` +
80
86
`Offline: ${
81
- data . map ( x => x . length ) . reduce ( ( a , b ) => a + b , 0 ) -
82
- data
87
+ shardData . map ( x => x . length ) . reduce ( ( a , b ) => a + b , 0 ) -
88
+ shardData
83
89
. map ( x => x . filter ( y => y . status === "ready" || y . status === "resuming" ) . length )
84
90
. reduce ( ( a , b ) => a + b , 0 )
85
91
} ` +
0 commit comments