mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-12 00:52:19 +03:00
Add a sleep of 2 seconds so copy-pasting the snippet won't cause a FloodWaitError
parent
71fc5b9c53
commit
fb42186960
|
@ -3,7 +3,7 @@ There are several `offset_xyz=` parameters that have no effect at all, but there
|
|||
```python
|
||||
from telethon.tl.functions.messages import GetDialogsRequest
|
||||
from telethon.tl.types import InputPeerEmpty
|
||||
|
||||
from time import sleep
|
||||
|
||||
dialogs = []
|
||||
users = []
|
||||
|
@ -24,4 +24,5 @@ while True:
|
|||
last_date = min(msg.date for msg in result.messages)
|
||||
if not result.dialogs:
|
||||
break
|
||||
sleep(2)
|
||||
```
|
Loading…
Reference in New Issue
Block a user