@botmesh/core - v2.0.0-alpha.2
    Preparing search index...

    Interface BroadcastOptions

    interface BroadcastOptions {
        batchSize?: number;
        delayBetween?: string | number;
        concurrency?: number;
        retries?: number;
        maxRetries?: number;
        sendOptions?: SendOptions;
        onProgress?: (done: number, total: number, last: BroadcastProgress) => void;
        onFail?: (chatId: string, error: Error) => void;
        signal?: AbortSignal;
    }
    Index
    batchSize?: number

    Chats per batch (default 10).

    delayBetween?: string | number

    Pause between batches: ms or a duration string ('2s', '1m'). Default 0.

    concurrency?: number

    Parallel sends inside a batch (default 1 — strictly sequential).

    retries?: number

    Retries per chat AFTER the first attempt, on a RateLimitedError (default 3, so up to 4 sends). Other errors are not retried. Same meaning as every retries option.

    maxRetries?: number

    Use retries (same meaning).

    sendOptions?: SendOptions

    Options forwarded to every send (quoted, mentions, …).

    onProgress?: (done: number, total: number, last: BroadcastProgress) => void

    Called after each chat settles: (done, total, last). Errors thrown here are reported, never fatal.

    onFail?: (chatId: string, error: Error) => void

    Called for each chat that finally failed. Errors thrown here are reported, never fatal.

    signal?: AbortSignal

    Abort to stop: no new send starts; in-flight sends finish; the rest land in pending.