mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-17 21:22:40 +00:00
Merge branch 'develop' into asyncio
This commit is contained in:
commit
ae96ca5b90
@ -22,6 +22,7 @@ from typing import Union, AsyncGenerator, Optional
|
|||||||
from async_generator import async_generator, yield_
|
from async_generator import async_generator, yield_
|
||||||
|
|
||||||
import pyrogram
|
import pyrogram
|
||||||
|
from pyrogram.api import types
|
||||||
from ...ext import BaseClient
|
from ...ext import BaseClient
|
||||||
|
|
||||||
|
|
||||||
@ -85,6 +86,7 @@ class IterChatMembers(BaseClient):
|
|||||||
queries = [query] if query else QUERIES
|
queries = [query] if query else QUERIES
|
||||||
total = limit or (1 << 31) - 1
|
total = limit or (1 << 31) - 1
|
||||||
limit = min(200, total)
|
limit = min(200, total)
|
||||||
|
resolved_chat_id = self.resolve_peer(chat_id)
|
||||||
|
|
||||||
filter = (
|
filter = (
|
||||||
Filters.RECENT
|
Filters.RECENT
|
||||||
@ -110,6 +112,9 @@ class IterChatMembers(BaseClient):
|
|||||||
if not chat_members:
|
if not chat_members:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
if isinstance(resolved_chat_id, types.InputPeerChat):
|
||||||
|
total = len(chat_members)
|
||||||
|
|
||||||
offset += len(chat_members)
|
offset += len(chat_members)
|
||||||
|
|
||||||
for chat_member in chat_members:
|
for chat_member in chat_members:
|
||||||
|
Loading…
Reference in New Issue
Block a user