telegram.WebhookInfo¶
-
class
telegram.WebhookInfo(url: str, has_custom_certificate: bool, pending_update_count: int, last_error_date: int = None, last_error_message: str = None, max_connections: int = None, allowed_updates: List[str] = None, **kwargs)¶ Bases:
telegram.base.TelegramObjectThis object represents a Telegram WebhookInfo.
Contains information about the current status of a webhook.
Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their
url,has_custom_certificate,pending_update_count,last_error_date,last_error_message,max_connectionsandallowed_updatesare equal.-
url¶ Webhook URL.
Type: str
-
has_custom_certificate¶ If a custom certificate was provided for webhook.
Type: bool
-
pending_update_count¶ Number of updates awaiting delivery.
Type: int
-
last_error_date¶ Optional. Unix time for the most recent error that happened.
Type: int
-
last_error_message¶ Optional. Error message in human-readable format.
Type: str
-
max_connections¶ Optional. Maximum allowed number of simultaneous HTTPS connections.
Type: int
-
allowed_updates¶ Optional. A list of update types the bot is subscribed to.
Type: List[ str]
Parameters: - url (
str) – Webhook URL, may be empty if webhook is not set up. - has_custom_certificate (
bool) –True, if a custom certificate was provided for webhook certificate checks. - pending_update_count (
int) – Number of updates awaiting delivery. - last_error_date (
int, optional) – Unix time for the most recent error that happened when trying to deliver an update via webhook. - last_error_message (
str, optional) – Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook. - max_connections (
int, optional) – Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery. - allowed_updates (List[
str], optional) – A list of update types the bot is subscribed to. Defaults to all update types.
-