From 707be4abe20d8933dac4fbe326fb125648d99a23 Mon Sep 17 00:00:00 2001 From: runebaas Date: Sun, 26 Aug 2018 12:33:04 +0200 Subject: [PATCH] Trying to fix !rank again --- Geekbot.net/Commands/User/Ranking/Rank.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Geekbot.net/Commands/User/Ranking/Rank.cs b/Geekbot.net/Commands/User/Ranking/Rank.cs index 50ccd51..8e40f06 100644 --- a/Geekbot.net/Commands/User/Ranking/Rank.cs +++ b/Geekbot.net/Commands/User/Ranking/Rank.cs @@ -157,9 +157,10 @@ namespace Geekbot.net.Commands.User.Ranking // .Take(amount) // .ToDictionary(key => key.UserId.AsUlong(), key => key.MessageCount); return _redis.Db - .HashGetAll($"{Context.Guild.Id}:Messages").ToDictionary().Take(amount + 1) + .HashGetAll($"{Context.Guild.Id}:Messages") .Where(user => !user.Key.Equals(0)) .OrderByDescending(s => s.Value) + .Take(amount) .ToDictionary(user => ulong.Parse(user.Key), user => int.Parse(user.Value)); }