From 12d184ebac349d2dfb34e7f50974c6b4947f2b64 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Fri, 6 Feb 2026 23:07:02 -0600 Subject: [PATCH] Update query for oldest entry in IsRateLimited to First as this seems to make more sense when it's using an ascending order? The behavior isn't right regardless right now --- KfChatDotNetBot/Services/RateLimitService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KfChatDotNetBot/Services/RateLimitService.cs b/KfChatDotNetBot/Services/RateLimitService.cs index 2a64f22..b90ce2e 100644 --- a/KfChatDotNetBot/Services/RateLimitService.cs +++ b/KfChatDotNetBot/Services/RateLimitService.cs @@ -46,7 +46,7 @@ public static class RateLimitService if (entries.Count >= command.RateLimitOptions.MaxInvocations) { result.IsRateLimited = true; - result.OldestEntryExpires = entries.OrderBy(x => x.EntryCreated).Last().EntryExpires; + result.OldestEntryExpires = entries.OrderBy(x => x.EntryCreated).First().EntryExpires; } return result; }