Module

x/grammy/mod.ts

The Telegram Bot Framework.
Go to Latest
type alias Transformer
import { type Transformer } from "https://deno.land/x/grammy@v1.10.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>>>