From 390a29d4483ac7021e16984da52cbf2070a68544 Mon Sep 17 00:00:00 2001 From: Lonami Date: Mon, 27 Nov 2017 13:38:14 +0100 Subject: [PATCH] GetParticipantsRequest now has hash --- Retrieving-all-chat-members.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Retrieving-all-chat-members.md b/Retrieving-all-chat-members.md index 5c30cb2..030d88f 100644 --- a/Retrieving-all-chat-members.md +++ b/Retrieving-all-chat-members.md @@ -13,7 +13,7 @@ all_participants = [] while True: participants = client.invoke(GetParticipantsRequest( - channel, ChannelParticipantsSearch(''), offset, limit + channel, ChannelParticipantsSearch(''), offset, limit, hash=0 )) if not participants.users: break @@ -22,4 +22,6 @@ while True: # 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.) \ No newline at end of file +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. \ No newline at end of file