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

    Type Alias ResponseTransformFn

    ResponseTransformFn: (method: string, result: unknown) => unknown

    Hook invoked with every successful Bot API response after it is unwrapped.

    Hooks run in registration order. A hook may observe the result (return undefined) or return a replacement value that is passed to subsequent hooks and ultimately returned to the caller.

    Type Declaration

      • (method: string, result: unknown): unknown
      • Parameters

        • method: string

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

        • result: unknown

          The unwrapped result payload returned by Telegram.

        Returns unknown

        A replacement result, or undefined to keep the current value.