Use "recent" filter for up to 10k members

This commit is contained in:
Dan 2019-01-07 10:00:42 +01:00
parent 6451d599b2
commit 491b96c9f6

View File

@ -86,6 +86,7 @@ class IterChatMembers(BaseClient):
yielded = set()
queries = [query] if query else QUERIES
total = limit or (1 << 31) - 1
filter = Filters.RECENT if total <= 10000 and filter == Filters.ALL else filter
limit = min(200, total)
if filter not in QUERYABLE_FILTERS: