peyk.platforms.telegram.types.webhook_info

Classes

WebhookInfo(url[, has_custom_certificate, ...])

Describes the current status of a webhook.

class peyk.platforms.telegram.types.webhook_info.WebhookInfo(url: str, has_custom_certificate: bool | None = None, pending_update_count: int | None = None, ip_address: str | None = None, last_error_date: int | None = None, last_error_message: str | None = None, last_synchronization_error_date: int | None = None, max_connections: int | None = None, allowed_updates: List[str] | None = None)[source]

Bases: object

Describes the current status of a webhook.

Variables:
  • url (str) – Webhook URL, may be empty if webhook is not set up

  • has_custom_certificate (bool | None) – True, if a custom certificate was provided for webhook certificate checks

  • pending_update_count (int | None) – Number of updates awaiting delivery

  • ip_address (str | None) – Currently used webhook IP address

  • last_error_date (int | None) – Unix time for the most recent error that happened when trying to deliver an update via webhook

  • last_error_message (str | None) – Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook

  • last_synchronization_error_date (int | None) – Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters

  • max_connections (int | None) – The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery

  • allowed_updates (List[str] | None) – A list of update types the bot is subscribed to. Defaults to all update types except chat_member, message_reaction, and message_reaction_count.

url: str
has_custom_certificate: bool | None = None
pending_update_count: int | None = None
ip_address: str | None = None
last_error_date: int | None = None
last_error_message: str | None = None
last_synchronization_error_date: int | None = None
max_connections: int | None = None
allowed_updates: List[str] | None = None
classmethod from_dict(data: dict | None) WebhookInfo | None[source]

Parse a Telegram API mapping into this type.

Parameters:

data – Raw Telegram API mapping, or None.

Returns:

Parsed type instance, or None when data is None.