Skip to main content
Module

x/grammy/mod.ts>CallbackQueryContext

The Telegram Bot Framework.
Very Popular
Go to Latest
type alias CallbackQueryContext
import { type CallbackQueryContext } from "https://deno.land/x/grammy@v1.11.1/mod.ts";

Type of the context object that is available inside the handlers for bot.callbackQuery.

This helper type can be used to annotate narrow down context objects the same way bot.callbackQuery does it. This allows you to how context objects in middleware that is not directly passed to bot.callbackQuery, hence not inferring the correct type automatically. That way, handlers can be defined in separate files and still have the correct types.

definition: Filter<C, "callback_query:data">