Update old examples

This commit is contained in:
Lonami Exo
2018-01-21 10:57:58 +01:00
parent ec38bd94d8
commit 182b6fc1cb
2 changed files with 21 additions and 6 deletions

View File

@@ -66,7 +66,7 @@ which use is very straightforward:
client(AddChatUserRequest(
chat_id,
user_to_add,
fwd_limit=10 # allow the user to see the 10 last messages
fwd_limit=10 # Allow the user to see the 10 last messages
))
@@ -111,8 +111,9 @@ a fixed limit:
all_participants = []
while True:
participants = client.invoke(GetParticipantsRequest(
channel, ChannelParticipantsSearch(''), offset, limit
participants = client(GetParticipantsRequest(
channel, ChannelParticipantsSearch(''), offset, limit,
hash=0
))
if not participants.users:
break