fix: align reverse range handling

This commit is contained in:
ShiroKSH 2026-07-14 13:57:57 +03:00
parent c7762379fe
commit 0db16e8859

View file

@ -796,8 +796,8 @@ public class DiscordClient(
foreach (var message in messages)
{
// Messages are ordered newest to oldest, so no later message can satisfy this bound.
if (after is not null && message.Id.CompareTo(after.Value) <= 0)
// Ensure that the messages are in range
if (message.Timestamp <= after?.ToDate())
yield break;
lastMessage ??= message;