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

    Interface BotOptions

    Options for initializing a BaseBotClient or Bot.

    interface BotOptions {
        apiRoot?: string;
        baseDelayMs?: number;
        fetch?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        requestTimeoutMs?: number;
        retry?: RetryOptions;
    }
    Index
    apiRoot?: string

    Custom base API endpoint URL (e.g. http://localhost:8081 for a local Telegram Bot API server).

    "https://api.telegram.org"

    baseDelayMs?: number

    Base delay in milliseconds used for exponential backoff during rate-limiting or server retries.

    Primarily customized in test suites for fast execution.

    fetch?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    Custom fetch implementation for deterministic testing, custom agents, or proxy tunneling.

    Type Declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | URL | Request, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    globalThis.fetch

    requestTimeoutMs?: number

    Per-request abort timeout in milliseconds. If a request (e.g. a hung connection) takes longer than this, it is aborted and treated as a retryable network error.

    For long-polling getUpdates calls, the effective timeout is automatically extended to cover the requested long-poll timeout (in seconds) plus a buffer, so a large poll timeout is never mistaken for a hang.

    30000

    retry?: RetryOptions

    Configurable auto-retry and flood control options.