Add a sleep of 2 seconds so copy-pasting the snippet won't cause a FloodWaitError

Tanuj 2017-10-01 14:36:10 +00:00
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)
```