From 7eb24e751784f5445f60b77dd2bd230d1ef653af Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Sun, 10 May 2026 17:16:41 -0500 Subject: [PATCH] Add missing where for image count --- KfChatDotNetBot/Commands/ImageCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KfChatDotNetBot/Commands/ImageCommands.cs b/KfChatDotNetBot/Commands/ImageCommands.cs index 4df54d8..f61a168 100644 --- a/KfChatDotNetBot/Commands/ImageCommands.cs +++ b/KfChatDotNetBot/Commands/ImageCommands.cs @@ -62,7 +62,7 @@ public class AddImageCommand : ICommand Key = key, Url = result, LastSeen = DateTimeOffset.MinValue, TagList = tags, Metadata = new ImageMetadataModel { AddedByUserId = user.Id, WhenAdded = DateTimeOffset.UtcNow } }, ctx); - var count = await db.Images.CountAsync(cancellationToken: ctx); + var count = await db.Images.Where(i => i.Key == key).CountAsync(cancellationToken: ctx); await db.SaveChangesAsync(ctx); await botInstance.SendChatMessageAsync( $"{user.FormatUsername()}, you added the following media to the {key} carousel which now has {count:N0} images[spoiler=\"Image\"][img]{url}[/img]", true);