Browse Source

Fix limit when getting from cache without message id

pull/1526/head
Paulo 5 years ago
parent
commit
4acdba9234
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Discord.Net.WebSocket/Entities/Messages/MessageCache.cs

+ 2
- 2
src/Discord.Net.WebSocket/Entities/Messages/MessageCache.cs View File

@@ -71,8 +71,8 @@ namespace Discord.WebSocket

if (dir == Direction.Before)
cachedMessageIds = cachedMessageIds.Reverse();
if (dir == Direction.Around)
limit /= 2;
if (dir == Direction.Around) //Only happens if fromMessageId is null, should only get "around" and itself (+1)
limit = limit / 2 + 1;

return cachedMessageIds
.Select(x =>


Loading…
Cancel
Save