Skip to main content
Module

x/grammy_menu/deps.deno.ts>HearsContext

Easily create interactive menus with grammY.
Go to Latest
type alias HearsContext
import { type HearsContext } from "https://deno.land/x/grammy_menu@v1.1.2/deps.deno.ts";

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

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

definition: Filter<NarrowMatch<C, string | RegExpMatchArray>, ":text" | ":caption">