mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Update get_history.py
This commit is contained in:
parent
bd121be76d
commit
7b76751e8f
@ -33,8 +33,7 @@ app.start()
|
|||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
m = app.get_history(target, offset_id=offset_id)
|
m = app.get_history(target, offset_id=offset_id)
|
||||||
except FloodWait as e:
|
except FloodWait as e: # For very large chats the method call can raise a FloodWait
|
||||||
# For very large chats the method call can raise a FloodWait
|
|
||||||
print("waiting {}".format(e.x))
|
print("waiting {}".format(e.x))
|
||||||
time.sleep(e.x) # Sleep X seconds before continuing
|
time.sleep(e.x) # Sleep X seconds before continuing
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user