From 63f5d3b09edf4117efe7dcdf6744c5de5f673617 Mon Sep 17 00:00:00 2001 From: Strikeeaglechase Date: Thu, 22 Aug 2024 01:05:58 -0400 Subject: [PATCH] Corrected filter for scoreboard --- src/application.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/application.ts b/src/application.ts index ca472df..98d2cec 100644 --- a/src/application.ts +++ b/src/application.ts @@ -255,7 +255,7 @@ class Application { private async createScoreboardMessage() { const embed = new Discord.EmbedBuilder({ title: "Scoreboard" }); // const filteredUsers = this.cachedSortedUsers.filter(u => u.elo != BASE_ELO && u.kills > KILLS_TO_RANK).slice(0, USERS_PER_PAGE); - let filteredUsers = await this.users.collection.find({ rank: { $lte: USERS_PER_PAGE } }).toArray(); + let filteredUsers = await this.users.collection.find({ rank: { $lte: USERS_PER_PAGE, $gt: 0 } }).toArray(); filteredUsers = filteredUsers.sort((a, b) => b.elo - a.elo); // ```ansi; // Offline player