import { webhookCallback } from "https://dotland.deno.dev/x/grammy@v1.27.0/mod.ts";
Creates a callback function that you can pass to a web framework (such as express) if you want to run your bot via webhooks. Use it like this:
const app = express() // or whatever you're using
const bot = new Bot('<token>')
app.use(webhookCallback(bot, 'express'))
Confer the grammY documentation to read more about how to run your bot with webhooks.
Type Parameters
optional
A extends FrameworkAdapter | AdapterNames = FrameworkAdapter | AdapterNamesType Parameters
optional
A extends FrameworkAdapter | AdapterNames = FrameworkAdapter | AdapterNamesParameters
adapter: A
optional
onTimeout: WebhookOptions["onTimeout"]optional
timeoutMilliseconds: WebhookOptions["timeoutMilliseconds"]optional
secretToken: WebhookOptions["secretToken"]