Skip to content

Commit 653fb49

Browse files
authored
fix: ArchivedThreadIterator ignores limits smaller than 50 and uses 50 instead (#3266)
1 parent eba89a4 commit 653fb49

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ These changes are available on the `master` branch, but have not yet been releas
2222
([#3231](https://github.com/Pycord-Development/pycord/pull/3231))
2323
- Allow `ForumTag` to be created without an emoji.
2424
([#3245](https://github.com/Pycord-Development/pycord/pull/3245))
25+
- Fix a bug where `TextChannel.archived_threads` would ignore any limit parameter
26+
smaller than 50 and use 50 instead.
27+
([#3266](https://github.com/Pycord-Development/pycord/pull/3266))
2528

2629
### Deprecated
2730

discord/iterators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ async def fill_queue(self) -> None:
870870
if not self.has_more:
871871
raise NoMoreItems()
872872

873-
limit = 50 if self.limit is None else max(self.limit, 50)
873+
limit = 50 if self.limit is None else min(self.limit, 50)
874874
data = await self.endpoint(self.channel_id, before=self.before, limit=limit)
875875

876876
# This stuff is obviously WIP because 'members' is always empty

0 commit comments

Comments
 (0)