diff --git a/telethon/client/telegrambaseclient.py b/telethon/client/telegrambaseclient.py index d3abbc3c..568a2bb6 100644 --- a/telethon/client/telegrambaseclient.py +++ b/telethon/client/telegrambaseclient.py @@ -118,7 +118,7 @@ class TelegramBaseClient(abc.ABC): flood_sleep_threshold (`int` | `float`, optional): The threshold below which the library should automatically - sleep on flood wait errors (inclusive). For instance, if a + sleep on flood wait and slowmode wait errors (inclusive). For instance, if a ``FloodWaitError`` for 17s occurs and `flood_sleep_threshold` is 20s, the library will ``sleep`` automatically. If the error was for 21s, it would ``raise FloodWaitError`` instead. Values diff --git a/telethon/client/users.py b/telethon/client/users.py index 685f6134..accdba77 100644 --- a/telethon/client/users.py +++ b/telethon/client/users.py @@ -82,7 +82,7 @@ class UserMethods: e.__class__.__name__, e) await asyncio.sleep(2) - except (errors.FloodWaitError, errors.FloodTestPhoneWaitError) as e: + except (errors.FloodWaitError, errors.SlowmodeWaitError, errors.FloodTestPhoneWaitError) as e: if utils.is_list_like(request): request = request[request_index]