From 970de7a68d8fa63afc51c96ec96e4a2c83b6e36b Mon Sep 17 00:00:00 2001 From: Anima <18208134+animafps@users.noreply.github.com> Date: Fri, 15 Oct 2021 08:18:47 +1300 Subject: [PATCH] fix(ready listener): fixed users count --- src/listeners/ready.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/listeners/ready.ts b/src/listeners/ready.ts index db25dfa..e60c60a 100644 --- a/src/listeners/ready.ts +++ b/src/listeners/ready.ts @@ -7,7 +7,7 @@ import { } from '@sapphire/framework' const dev = process.env.NODE_ENV !== 'production' -export class UserEvent extends Listener { +export class UserListener extends Listener { public constructor(context: PieceContext, options?: ListenerOptions) { super(context, { ...options, @@ -33,7 +33,10 @@ ${pad}[+] Gateway (${this.container.client.user?.username}#${ this.container.client.user?.discriminator }) ${pad}Severs: ${this.container.client.guilds.cache.size} -${pad}Serving: ${this.container.client.users.cache.size} people +${pad}Users: ${this.container.client.guilds.cache.reduce( + (acc, val) => acc + (val.memberCount ?? 0), + 0 + )} ${dev ? ` ${pad} DEVELOPMENT MODE` : ''} `.trim() )