telegramsjs
    Preparing search index...

    Class WebhookInfo

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    allowedUpdates: (
        | "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_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(): Date | null

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

      Returns Date | null

    • get lastedTimestamp(): Date | null

      Return the timestamp most recent error that happened when trying to deliver an update via webhook, in milliseconds

      Returns Date | null

    • get synchronizatedAt(): Date | null

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

      Returns Date | null

    • get synchronizatedTimestamp(): number | null

      Return the timestamp most recent error that happened when trying to synchronize available updates with Telegram datacenters, in milliseconds

      Returns number | null

    Methods

    • Protected

      Creates a clone of the current instance

      Returns Base

      A clone of the current instance

    • 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.

    • Flatten an object. Any properties that are collections will get converted to an array of keys.

      Parameters

      • OptionalpropsRecursive: boolean

        Optional. If true, calls toJSON method on nested objects.

      • ...props: Record<string, string | boolean>[]

        Optional. Specific properties to include/exclude, or rename.

      Returns Record<string, any>

      Flattened object.

    • Returns the id instance Chat, User, ChatMember and other

      Returns string | null