Sleep seems to be optional

Lonami 2017-09-27 12:49:11 +02:00
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.)