diff --git a/docs/source/start/errors.rst b/docs/source/start/errors.rst index f5747d77..8e592f18 100644 --- a/docs/source/start/errors.rst +++ b/docs/source/start/errors.rst @@ -96,10 +96,12 @@ The value is stored in the ``x`` attribute of the exception object: .. code-block:: python - import time + import asyncio from pyrogram.errors import FloodWait - try: - ... # Your code - except FloodWait as e: - time.sleep(e.x) # Wait "x" seconds before continuing + ... + try: + ... # Your code + except FloodWait as e: + await asyncio.sleep(e.x) # Wait "x" seconds before continuing + ... \ No newline at end of file