Skip to main content
Defined in: testing/MockProvider.ts:134 Options of MockProvider.

Properties

streaming?

Defined in: testing/MockProvider.ts:140 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?

Defined in: testing/MockProvider.ts:142 capabilities.maxTextLength to simulate. Default: unset.

maxTextBytes?

Defined in: testing/MockProvider.ts:144 capabilities.maxTextBytes (UTF-8) to simulate. Default: unset.

textFormat?

Defined in: testing/MockProvider.ts:146 capabilities.textFormat to simulate (e.g. 'whatsapp'). Default: unset.

buttons?

Defined in: testing/MockProvider.ts:151 Native buttons to simulate (capabilities.buttons and the 'buttons' content kind). false simulates a channel without them (Baileys, SMS…). Default true.

textFormatFor?

Defined in: testing/MockProvider.ts:156 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).

Parameters

Returns

TextFormat | undefined

supports?

Defined in: testing/MockProvider.ts:164 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?

Defined in: testing/MockProvider.ts:170 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?

Defined in: testing/MockProvider.ts:175 Cap of MockProvider.journal; the oldest entries are dropped first (default 10000, Infinity disables the cap). outbox is never capped.

interactionsRequireAck?

Defined in: testing/MockProvider.ts:180 capabilities.interactionsRequireAck to simulate (Discord): the bot then acknowledges every interaction on its own (see ctx.acknowledge()). Default false.