Transformer
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
Type
ts
<M extends Methods<R>>(
prev: ApiCallFn<R>,
method: M,
payload: Payload<M, R>,
signal?: AbortSignal,
) => Promise<ApiResponse<ApiCallResult<M, R>>>