Remove the aggressive hack from get_participants

This commit is contained in:
Lonami Exo
2021-09-17 20:13:05 +02:00
parent be3ed894c6
commit 1036c3cb52
3 changed files with 46 additions and 76 deletions

View File

@@ -722,8 +722,7 @@ class TelegramClient:
limit: float = (),
*,
search: str = '',
filter: '_tl.TypeChannelParticipantsFilter' = None,
aggressive: bool = False) -> chats._ParticipantsIter:
filter: '_tl.TypeChannelParticipantsFilter' = None) -> chats._ParticipantsIter:
"""
Iterator over the participants belonging to the specified chat.
@@ -739,9 +738,6 @@ class TelegramClient:
search (`str`, optional):
Look for participants with this string in name/username.
If ``aggressive is True``, the symbols from this string will
be used.
filter (:tl:`ChannelParticipantsFilter`, optional):
The filter to be used, if you want e.g. only admins
Note that you might not have permissions for some filter.
@@ -753,16 +749,6 @@ class TelegramClient:
*restricted* users. If you want *banned* users you should
use :tl:`ChannelParticipantsKicked` instead.
aggressive (`bool`, optional):
Aggressively looks for all participants in the chat.
This is useful for channels since 20 July 2018,
Telegram added a server-side limit where only the
first 200 members can be retrieved. With this flag
set, more than 200 will be often be retrieved.
This has no effect if a ``filter`` is given.
Yields
The :tl:`User` objects returned by :tl:`GetParticipants`
with an additional ``.participant`` attribute which is the