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

x/grammy/mod.ts>Transformer

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

API call transformers are functions that can access and modify the method and payload of an API call on the fly. This can be useful if you want to implement rate limiting or other things against the Telegram Bot API.

Confer the grammY documentation to read more about how to use transformers.

Type Parameters

optional
R extends RawApi = RawApi
definition: <M extends Methods<R>>(
prev: ApiCallFn<R>,
method: M,
payload: Payload<M, R>,
signal?: AbortSignal,
) => Promise<ApiResponse<ApiCallResult<M, R>>>