import { webhookCallback } from "https://deno.land/x/grammy@v1.21.1/convenience/webhook.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.
Parameters
bot: Bot<C>
The bot for which to create a callback
An optional string identifying the framework (default: 'express')
An optional strategy to handle timeouts (default: 'throw')
An optional number of timeout milliseconds (default: 10_000)