mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-24 23:40:45 +03:00
Saner timeouts for conversation (#1099)
This commit is contained in:
parent
8492300780
commit
c2c8a3caeb
|
@ -166,7 +166,7 @@ class DialogMethods(UserMethods):
|
||||||
|
|
||||||
def conversation(
|
def conversation(
|
||||||
self, entity,
|
self, entity,
|
||||||
*, timeout=None, total_timeout=60, max_messages=100,
|
*, timeout=60, total_timeout=None, max_messages=100,
|
||||||
exclusive=True, replies_are_responses=True):
|
exclusive=True, replies_are_responses=True):
|
||||||
"""
|
"""
|
||||||
Creates a `Conversation <telethon.tl.custom.conversation.Conversation>`
|
Creates a `Conversation <telethon.tl.custom.conversation.Conversation>`
|
||||||
|
@ -178,15 +178,15 @@ class DialogMethods(UserMethods):
|
||||||
The entity with which a new conversation should be opened.
|
The entity with which a new conversation should be opened.
|
||||||
|
|
||||||
timeout (`int` | `float`, optional):
|
timeout (`int` | `float`, optional):
|
||||||
The default timeout *per action* to be used. You
|
The default timeout *per action* to be used. You may also
|
||||||
can override this on each action. By default there
|
override this timeout on a per-method basis. By default each
|
||||||
is no per-action time limit but there is still a
|
action can take up to 60 seconds (the value of this timeout).
|
||||||
`total_timeout` for the entire conversation.
|
|
||||||
|
|
||||||
total_timeout (`int` | `float`, optional):
|
total_timeout (`int` | `float`, optional):
|
||||||
The total timeout to use for the whole conversation.
|
The total timeout to use for the whole conversation. This
|
||||||
After these many seconds pass, subsequent actions
|
takes priority over per-action timeouts. After these many
|
||||||
will result in ``asyncio.TimeoutError``.
|
seconds pass, subsequent actions will result in
|
||||||
|
``asyncio.TimeoutError``.
|
||||||
|
|
||||||
max_messages (`int`, optional):
|
max_messages (`int`, optional):
|
||||||
The maximum amount of messages this conversation will
|
The maximum amount of messages this conversation will
|
||||||
|
|
Loading…
Reference in New Issue
Block a user