Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/grammy/composer.ts

The Telegram Bot Framework.
Very Popular
Go to Latest
import * as grammy from "https://deno.land/x/grammy@v1.17.1/composer.ts";

Classes

This error is thrown when middleware throws. It simply wraps the original error (accessible via the error property), but also provides access to the respective context object that was processed while the error occurred.

The composer is the heart of the middleware system in grammY. It is also the superclass of Bot. Whenever you call use or on or some of the other methods on your bot, you are in fact using the underlying composer instance to register your middleware.

Functions

Runs some given middleware function with a given context object.

Interfaces

Middleware in the form of a container for a function.

Type Aliases

Type of the middleware that can be passed to bot.callbackQuery.

Type of the middleware that can be passed to bot.chatType.

Type of the middleware that can be passed to bot.chosenInlineResult.

Type of the middleware that can be passed to bot.command.

Type of the middleware that can be passed to bot.gameQuery.

Type of the middleware that can be passed to bot.hears.

Type of the middleware that can be passed to bot.inlineQuery.

Middleware for grammY, either as a function or as a container for a function.

Middleware in the form of a function.

A function of this type is passed as the second parameter to all middleware. Invoke it to call the downstream middleware and pass on the control flow.