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

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

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>>>