From 33d04b5916afbc312c84b7c0df334a2ad90b8f68 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 30 Aug 2020 10:58:55 +0200 Subject: [PATCH] Change default get/iter_chat_members filter to "recent" --- pyrogram/methods/chats/get_chat_members.py | 4 ++-- pyrogram/methods/chats/iter_chat_members.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyrogram/methods/chats/get_chat_members.py b/pyrogram/methods/chats/get_chat_members.py index d3e87c7d..d55a7410 100644 --- a/pyrogram/methods/chats/get_chat_members.py +++ b/pyrogram/methods/chats/get_chat_members.py @@ -42,7 +42,7 @@ class GetChatMembers(Scaffold): offset: int = 0, limit: int = 200, query: str = "", - filter: str = Filters.ALL + filter: str = Filters.RECENT ) -> List["types.ChatMember"]: """Get a chunk of the members list of a chat. @@ -78,7 +78,7 @@ class GetChatMembers(Scaffold): *"recent"* - recent members only, *"administrators"* - chat administrators only. Only applicable to supergroups and channels. - Defaults to *"all"*. + Defaults to *"recent"*. .. [1] Server limit: on supergroups, you can get up to 10,000 members for a single query and up to 200 members on channels. diff --git a/pyrogram/methods/chats/iter_chat_members.py b/pyrogram/methods/chats/iter_chat_members.py index 2954bcdb..59def3c1 100644 --- a/pyrogram/methods/chats/iter_chat_members.py +++ b/pyrogram/methods/chats/iter_chat_members.py @@ -43,7 +43,7 @@ class IterChatMembers(Scaffold): chat_id: Union[int, str], limit: int = 0, query: str = "", - filter: str = Filters.ALL + filter: str = Filters.RECENT ) -> Optional[AsyncGenerator["types.ChatMember", None]]: """Iterate through the members of a chat sequentially. @@ -72,7 +72,7 @@ class IterChatMembers(Scaffold): *"bots"* - bots only, *"recent"* - recent members only, *"administrators"* - chat administrators only. - Defaults to *"all"*. + Defaults to *"recent"*. Returns: ``Generator``: A generator yielding :obj:`~pyrogram.types.ChatMember` objects.