Change default get/iter_chat_members filter to "recent"

This commit is contained in:
Dan 2020-08-30 10:58:55 +02:00
parent 6a5469edaf
commit 33d04b5916
2 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

@ -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.