telebot-ts API Documentation - v1.0.0
    Preparing search index...

    Function createFetchWebhook

    • Creates a Web Standards fetch handler for Next.js App Router, Cloudflare Workers, Hono, Deno, and Bun.

      Parameters

      Returns FetchWebhookHandler

      Standard fetch handler function (request: Request) => Promise<Response>.

      // app/api/webhook/route.ts (Next.js App Router)
      import { createFetchWebhook } from "telebot-ts";
      export const POST = createFetchWebhook(app, { secret_token: process.env.WEBHOOK_SECRET });