Class WebhookInfo

Hierarchy (view full)

Constructors

Properties

allowedUpdates: (
    | "chat_member"
    | "poll"
    | "message"
    | "edited_message"
    | "channel_post"
    | "edited_channel_post"
    | "business_connection"
    | "business_message"
    | "edited_business_message"
    | "deleted_business_messages"
    | "message_reaction"
    | "message_reaction_count"
    | "inline_query"
    | "chosen_inline_result"
    | "callback_query"
    | "shipping_query"
    | "pre_checkout_query"
    | "poll_answer"
    | "my_chat_member"
    | "chat_join_request"
    | "chat_boost"
    | "removed_chat_boost")[]

A list of update types the bot is subscribed to. Defaults to all update types except chat_member

connections?: number

The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery

customCertificate: boolean

True, if a custom certificate was provided for webhook certificate checks

errorMessage?: string

Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook

ipAddress?: string

Currently used webhook IP address

lastedUnixTime?: number

Unix time for the most recent error that happened when trying to deliver an update via webhook

pendingCount: number

Number of updates awaiting delivery

synchronizatedUnixTime?: number

Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters

url?: string

Webhook URL, may be empty if webhook is not set up

Accessors

  • get lastedAt(): null | Date
  • Date for the most recent error that happened when trying to deliver an update via webhook

    Returns null | Date

  • get lastedTimestamp(): null | Date
  • Return the timestamp most recent error that happened when trying to deliver an update via webhook, in milliseconds

    Returns null | Date

  • get synchronizatedAt(): null | Date
  • Date of the most recent error that happened when trying to synchronize available updates with Telegram datacenters

    Returns null | Date

  • get synchronizatedTimestamp(): null | number
  • Return the timestamp most recent error that happened when trying to synchronize available updates with Telegram datacenters, in milliseconds

    Returns null | number

Methods

  • Protected

    Patches the current instance with new data

    Parameters

    • data: Record<string, any>

      The data to patch the instance with

    Returns Record<string, any>

    The patched data

  • Protected

    Updates the current instance with new data and returns a clone of the updated instance

    Parameters

    • data: Record<string, any>

      The data to update the instance with

    Returns Base

    A clone of the updated instance

  • Use this method to remove webhook integration if you decide to switch back to getUpdates.

    Parameters

    • OptionaldropPendingUpdates: boolean

      Pass True to drop all pending updates

    Returns Promise<true>

    Returns True on success.