Allow per-request flood sleep threshold selection (#3123)

This commit is contained in:
penn5
2021-08-06 07:13:34 +01:00
committed by GitHub
parent e5599c178b
commit e546ae2f85
2 changed files with 10 additions and 3 deletions

View File

@@ -837,6 +837,11 @@ class TelegramBaseClient(abc.ABC):
executed sequentially on the server. They run in arbitrary
order by default.
flood_sleep_threshold (`int` | `None`, optional):
The flood sleep threshold to use for this request. This overrides
the default value stored in
`client.flood_sleep_threshold <telethon.client.telegrambaseclient.TelegramBaseClient.flood_sleep_threshold>`
Returns:
The result of the request (often a `TLObject`) or a list of
results if more than one request was given.