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

    Interface ApiResponse<T>

    Generic response wrapper returned by the Telegram Bot API.

    interface ApiResponse<T = unknown> {
        description?: string;
        error_code?: number;
        ok: boolean;
        parameters?: { migrate_to_chat_id?: number; retry_after?: number };
        result?: T;
    }

    Type Parameters

    • T = unknown

      The unwrapped result payload type returned on success.

    Index
    description?: string

    Human-readable explanation of why the request was unsuccessful.

    error_code?: number

    Numeric error code if the request was unsuccessful.

    ok: boolean

    True, if the request was successful.

    parameters?: { migrate_to_chat_id?: number; retry_after?: number }

    Additional parameters which can help to automatically handle the error.

    Type Declaration

    • Optionalmigrate_to_chat_id?: number

      The group has been migrated to a supergroup with this identifier.

    • Optionalretry_after?: number

      Number of seconds to wait before repeating the request.

    result?: T

    Result payload if the request succeeded.