How updates run.
on_unhandled: updates that give no event, the excluded contexts among them.deadline: how longChatHandler.handlehas before the update isnotAccepted. Default 10 seconds.click_deadline: how long a click handler has before the click is answered. Default 2.5 seconds. The handler then keeps running, detached, and the update isaccepted.command_deadline: how long a command handler has. Default 10 seconds. The handler is then interrupted, and the update isaccepted.
Attributes#
| Attribute | Type | Description |
|---|---|---|
on_unhandled | OnUnhandled | None = None | |
deadline | DurationInput = '10 seconds' | |
click_deadline | DurationInput = '2500 millis' | |
command_deadline | DurationInput = '10 seconds' |
Functions#
__init__#
__init__(*, on_unhandled=None, deadline='10 seconds', click_deadline='2500 millis', command_deadline='10 seconds') -> None| Parameter | Type | Description |
|---|---|---|
on_unhandled | OnUnhandled | None = None | |
deadline | DurationInput = '10 seconds' | |
click_deadline | DurationInput = '2500 millis' | |
command_deadline | DurationInput = '10 seconds' |
parsed#
parsed() -> _receive.OptionsThe options with their durations parsed.
Returns _receive.Options
def parsed(self) -> _receive.Options:
"""The options with their durations parsed."""
return _receive.Options(
on_unhandled=self.on_unhandled,
deadline=from_input_unsafe(self.deadline),
click_deadline=from_input_unsafe(self.click_deadline),
command_deadline=from_input_unsafe(self.command_deadline),
)