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

    Interface MockProviderOptions

    Options of MockProvider.

    interface MockProviderOptions {
        streaming?: StreamingMode;
        maxTextLength?: number;
        maxTextBytes?: number;
        textFormat?: TextFormat;
        buttons?: boolean;
        textFormatFor?: (chatId: string) => TextFormat | undefined;
        supports?: MockProviderSupports;
        exclusiveSession?: boolean;
        maxJournal?: number;
        interactionsRequireAck?: boolean;
    }
    Index
    streaming?: StreamingMode

    Streaming mode to simulate (capabilities.streaming). 'edit' also exposes editMessage (recorded in edits); 'draft' exposes sendDraft (recorded in drafts) and editMessage. Default 'none' (no edit, no drafts).

    maxTextLength?: number

    capabilities.maxTextLength to simulate. Default: unset.

    maxTextBytes?: number

    capabilities.maxTextBytes (UTF-8) to simulate. Default: unset.

    textFormat?: TextFormat

    capabilities.textFormat to simulate (e.g. 'whatsapp'). Default: unset.

    buttons?: boolean

    Native buttons to simulate (capabilities.buttons and the 'buttons' content kind). false simulates a channel without them (Baileys, SMS…). Default true.

    textFormatFor?: (chatId: string) => TextFormat | undefined

    Per-chat text format to simulate (IProvider.textFormatFor), e.g. a provider that serves WhatsApp and SMS chats. Default: unset (the mock has no textFormatFor).

    Which optional seams the mock exposes. A disabled seam is hidden (the instance property reads undefined), so the bot treats it exactly like a provider that lacks the method. Defaults follow streaming: edit and delete when it is not 'none', drafts when it is 'draft'. When left unset, a subclass's own override of the method is never hidden; an explicit false hides it too.

    exclusiveSession?: boolean

    capabilities.exclusiveSession to simulate: a transport that allows one live connection (Baileys). Multi-replica coordination then starts the mock on the elected replica only. Default: unset.

    maxJournal?: number

    Cap of MockProvider.journal; the oldest entries are dropped first (default 10000, Infinity disables the cap). outbox is never capped.

    interactionsRequireAck?: boolean

    capabilities.interactionsRequireAck to simulate (Discord): the bot then acknowledges every interaction on its own (see ctx.acknowledge()). Default false.