mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
This PR updates the `invoke()` method to correctly handle `sleep_threshold=0`. ### Before: Even when `sleep_threshold=0`, the client still waits for the full FloodWait duration. ### After: With this change: - If `sleep_threshold == 0`, it raises the FloodWait immediately (no sleep). - If `sleep_threshold < 0`, it always raises (never sleeps). - If `sleep_threshold > 0`, it only sleeps if `amount <= sleep_threshold`. This makes `sleep_threshold` behave more as expected and allows advanced bot handling logic outside of Pyrogram. Thanks! |
||
|---|---|---|
| .. | ||
| internals | ||
| __init__.py | ||
| auth.py | ||
| session.py | ||