mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 01:16:35 +03:00
Sleep seems to be optional
parent
5afb8bc66f
commit
7520218e46
|
@ -8,7 +8,7 @@ from telethon.tl.types import ChannelParticipantsSearch
|
|||
from time import sleep
|
||||
|
||||
offset = 0
|
||||
limit = 50
|
||||
limit = 100
|
||||
all_participants = []
|
||||
|
||||
while True:
|
||||
|
@ -19,7 +19,7 @@ while True:
|
|||
break
|
||||
all_participants.extend(participants.users)
|
||||
offset += len(participants.users)
|
||||
sleep(1)
|
||||
# sleep(1) # This line seems to be optional, no guarantees!
|
||||
```
|
||||
|
||||
Note that `GetParticipantsRequest` returns [`ChannelParticipants`](https://lonamiwebs.github.io/Telethon/constructors/channels/channel_participants.html), which may have more information you need (like the role of the participants, total count of members, etc.)
|
Loading…
Reference in New Issue
Block a user