mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-07 13:34:59 +03:00
Update chats.py
Added the ability to aggressive search with custom set of symbols
This commit is contained in:
parent
fbc46bd388
commit
5722b5a91e
|
@ -11,8 +11,9 @@ class ChatMethods(UserMethods):
|
||||||
|
|
||||||
@async_generator
|
@async_generator
|
||||||
async def iter_participants(
|
async def iter_participants(
|
||||||
self, entity, limit=None, *, search='',
|
self, entity, limit=None, *, search='',
|
||||||
filter=None, aggressive=False, _total=None):
|
filter=None, aggressive=False, symbols=None,
|
||||||
|
_total=None):
|
||||||
"""
|
"""
|
||||||
Iterator over the participants belonging to the specified chat.
|
Iterator over the participants belonging to the specified chat.
|
||||||
|
|
||||||
|
@ -41,6 +42,9 @@ class ChatMethods(UserMethods):
|
||||||
|
|
||||||
This has no effect if a ``filter`` is given.
|
This has no effect if a ``filter`` is given.
|
||||||
|
|
||||||
|
symbols (`list`, optional):
|
||||||
|
Set of symbols for aggressive search
|
||||||
|
|
||||||
_total (`list`, optional):
|
_total (`list`, optional):
|
||||||
A single-item list to pass the total parameter by reference.
|
A single-item list to pass the total parameter by reference.
|
||||||
|
|
||||||
|
@ -90,7 +94,7 @@ class ChatMethods(UserMethods):
|
||||||
offset=0,
|
offset=0,
|
||||||
limit=200,
|
limit=200,
|
||||||
hash=0
|
hash=0
|
||||||
) for x in range(ord('a'), ord('z') + 1)]
|
) for x in symbols or range(ord('a'), ord('z') + 1)]
|
||||||
else:
|
else:
|
||||||
requests = [functions.channels.GetParticipantsRequest(
|
requests = [functions.channels.GetParticipantsRequest(
|
||||||
channel=entity,
|
channel=entity,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user