mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-28 20:33:45 +03:00
GetParticipantsRequest now has hash
parent
a118cfef9a
commit
390a29d448
|
@ -13,7 +13,7 @@ all_participants = []
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
participants = client.invoke(GetParticipantsRequest(
|
participants = client.invoke(GetParticipantsRequest(
|
||||||
channel, ChannelParticipantsSearch(''), offset, limit
|
channel, ChannelParticipantsSearch(''), offset, limit, hash=0
|
||||||
))
|
))
|
||||||
if not participants.users:
|
if not participants.users:
|
||||||
break
|
break
|
||||||
|
@ -23,3 +23,5 @@ while True:
|
||||||
```
|
```
|
||||||
|
|
||||||
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.)
|
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.)
|
||||||
|
|
||||||
|
The `hash` of the request is **not** the channel hash. It's a special hash calculated based on the participants you already know about, so Telegram can avoid resending the whole thing. You can just leave it to 0.
|
Loading…
Reference in New Issue
Block a user