telebot-ts API Documentation - v1.0.0
    Preparing search index...

    Type Alias RequestTransformFn

    RequestTransformFn: (method: string, payload: Record<string, unknown>) => void

    Hook invoked with every outgoing Bot API request before it is serialized and sent.

    Hooks run synchronously in registration order and may mutate payload to decorate or rewrite requests (e.g. metrics, logging, forced options). Throwing from a hook fails the request.

    Type Declaration

      • (method: string, payload: Record<string, unknown>): void
      • Parameters

        • method: string

          The Bot API method name (e.g. "sendMessage").

        • payload: Record<string, unknown>

          The mutable request payload about to be sent.

        Returns void