generated from nhcarrigan/template
feat: better user counting
This commit is contained in:
parent
37879b6e49
commit
17c2cf3a8d
@ -28,7 +28,12 @@ export class Prometheus {
|
|||||||
name: "users",
|
name: "users",
|
||||||
help: "The number of users the bot knows."
|
help: "The number of users the bot knows."
|
||||||
});
|
});
|
||||||
this.users.set(bot.users.cache.size);
|
this.users.set(
|
||||||
|
bot.guilds.cache.reduce(
|
||||||
|
(members, guild) => members + guild.memberCount,
|
||||||
|
0
|
||||||
|
)
|
||||||
|
);
|
||||||
this.errors = new Counter({
|
this.errors = new Counter({
|
||||||
name: "errors",
|
name: "errors",
|
||||||
help: "The number of errors handled by the process."
|
help: "The number of errors handled by the process."
|
||||||
@ -45,7 +50,12 @@ export class Prometheus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public updateUsers(bot: ExtendedClient) {
|
public updateUsers(bot: ExtendedClient) {
|
||||||
this.users.set(bot.users.cache.size);
|
this.users.set(
|
||||||
|
bot.guilds.cache.reduce(
|
||||||
|
(members, guild) => members + guild.memberCount,
|
||||||
|
0
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async updateEntitlements(bot: ExtendedClient) {
|
public async updateEntitlements(bot: ExtendedClient) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user