mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Change default get/iter_chat_members filter to "recent"
This commit is contained in:
parent
6a5469edaf
commit
33d04b5916
@ -42,7 +42,7 @@ class GetChatMembers(Scaffold):
|
|||||||
offset: int = 0,
|
offset: int = 0,
|
||||||
limit: int = 200,
|
limit: int = 200,
|
||||||
query: str = "",
|
query: str = "",
|
||||||
filter: str = Filters.ALL
|
filter: str = Filters.RECENT
|
||||||
) -> List["types.ChatMember"]:
|
) -> List["types.ChatMember"]:
|
||||||
"""Get a chunk of the members list of a chat.
|
"""Get a chunk of the members list of a chat.
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ class GetChatMembers(Scaffold):
|
|||||||
*"recent"* - recent members only,
|
*"recent"* - recent members only,
|
||||||
*"administrators"* - chat administrators only.
|
*"administrators"* - chat administrators only.
|
||||||
Only applicable to supergroups and channels.
|
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
|
.. [1] Server limit: on supergroups, you can get up to 10,000 members for a single query and up to 200 members
|
||||||
on channels.
|
on channels.
|
||||||
|
@ -43,7 +43,7 @@ class IterChatMembers(Scaffold):
|
|||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
limit: int = 0,
|
limit: int = 0,
|
||||||
query: str = "",
|
query: str = "",
|
||||||
filter: str = Filters.ALL
|
filter: str = Filters.RECENT
|
||||||
) -> Optional[AsyncGenerator["types.ChatMember", None]]:
|
) -> Optional[AsyncGenerator["types.ChatMember", None]]:
|
||||||
"""Iterate through the members of a chat sequentially.
|
"""Iterate through the members of a chat sequentially.
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ class IterChatMembers(Scaffold):
|
|||||||
*"bots"* - bots only,
|
*"bots"* - bots only,
|
||||||
*"recent"* - recent members only,
|
*"recent"* - recent members only,
|
||||||
*"administrators"* - chat administrators only.
|
*"administrators"* - chat administrators only.
|
||||||
Defaults to *"all"*.
|
Defaults to *"recent"*.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
``Generator``: A generator yielding :obj:`~pyrogram.types.ChatMember` objects.
|
``Generator``: A generator yielding :obj:`~pyrogram.types.ChatMember` objects.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user