CF Workers Telegram Bot - v11.2.1
    Preparing search index...

    Class Webhook

    Webhook class for managing Telegram bot webhook configuration. Handles setting up and configuring webhooks for Telegram bots.

    Index

    Constructors

    Methods

    Constructors

    • Creates a new Webhook instance.

      Parameters

      • token: string

        The Telegram bot token

      • request: Request

        The incoming request object used to determine the webhook URL

      Returns Webhook

    Methods

    • Removes the webhook configuration from Telegram.

      Returns Promise<Response>

      Promise that resolves to the fetch response from Telegram

      Will throw an error if the fetch request fails

    • Sets the webhook URL for the Telegram bot.

      Returns Promise<Response>

      Promise that resolves to the fetch response from Telegram

      Will throw an error if the fetch request fails