From fb4218696043f47fde060371b49067a1145597c7 Mon Sep 17 00:00:00 2001 From: Tanuj Date: Sun, 1 Oct 2017 14:36:10 +0000 Subject: [PATCH] Add a sleep of 2 seconds so copy-pasting the snippet won't cause a FloodWaitError --- Retrieving-all-dialogs.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Retrieving-all-dialogs.md b/Retrieving-all-dialogs.md index fd0593a..56e6da9 100644 --- a/Retrieving-all-dialogs.md +++ b/Retrieving-all-dialogs.md @@ -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) ``` \ No newline at end of file