Fix exception raised by around strategy when the limit is set to 100/101

This commit is contained in:
Josh 2023-05-06 19:20:37 +10:00 committed by GitHub
parent 252ac38f92
commit 23352fba79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1722,12 +1722,12 @@ class Messageable:
async def _around_strategy(retrieve: int, around: Optional[Snowflake], limit: Optional[int]): async def _around_strategy(retrieve: int, around: Optional[Snowflake], limit: Optional[int]):
if not around: if not around:
return [] return [], None, 0
around_id = around.id if around else None around_id = around.id if around else None
data = await self._state.http.logs_from(channel.id, retrieve, around=around_id) data = await self._state.http.logs_from(channel.id, retrieve, around=around_id)
return data, None, limit return data, None, 0
async def _after_strategy(retrieve: int, after: Optional[Snowflake], limit: Optional[int]): async def _after_strategy(retrieve: int, after: Optional[Snowflake], limit: Optional[int]):
after_id = after.id if after else None after_id = after.id if after else None