Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback


The Telegram Bot Framework.
Very Popular
Go to Latest
type alias CommandContext
import { type CommandContext } from "";

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

This helper type can be used to narrow down context objects the same way how bot.command does it. This allows you to annotate context objects in middleware that is not directly passed to bot.command, 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>, ":entities:bot_command">