crash() was called (or once backend crashed).
Extends
Constructors
Constructor
Parameters
Returns
CrashableProvider
Overrides
MockProvider.constructor
Properties
id
Inherited from
MockProvider.id
capabilities
Inherited from
MockProvider.capabilities
selfId
Inherited from
MockProvider.selfId
outbox
Inherited from
MockProvider.outbox
journal
send with the ref it returned. Bounded by maxJournal.
Inherited from
MockProvider.journal
edits
streaming 'edit'/'draft' or supports.edit).
Inherited from
MockProvider.edits
drafts
streaming: 'draft' or supports.drafts).
Inherited from
MockProvider.drafts
deleted
streaming not 'none' or supports.delete).
Inherited from
MockProvider.deleted
acks
interactionId
opts?
opts.text?
opts.defer?
Inherited from
MockProvider.acks
textFormatFor?
Parameters
Returns
TextFormat | undefined
Inherited from
MockProvider.textFormatFor
maxJournal
Inherited from
MockProvider.maxJournal
starts
start() calls so far.
Inherited from
MockProvider.starts
stops
stop() calls so far.
Inherited from
MockProvider.stops
Methods
editMessage()
undefined) unless enabled — see MockProviderOptions.supports.
Parameters
Returns
Promise<SendResult<unknown>>
Inherited from
MockProvider.editMessage
acknowledgeInteraction()
Parameters
Returns
Promise<void>
Inherited from
MockProvider.acknowledgeInteraction
deleteMessage()
undefined) unless enabled — see MockProviderOptions.supports.
Parameters
Returns
Promise<void>
Inherited from
MockProvider.deleteMessage
sendDraft()
undefined) unless enabled — see MockProviderOptions.supports.
Parameters
Returns
Promise<void>
Inherited from
MockProvider.sendDraft
stopDraft()
Returns
boolean
Inherited from
MockProvider.stopDraft
start()
Returns
Promise<void>
Inherited from
MockProvider.start
stop()
Returns
Promise<void>
Inherited from
MockProvider.stop
onEvent()
Parameters
Returns
() =>void
Inherited from
MockProvider.onEvent
downloadMedia()
incomingMedia,
chat.sendMedia); an empty buffer for a legacy token: null ref
(incoming(text, { type: 'image' })). A { url } token without bytes rejects with
MediaUnavailableError — the mock never touches the network.
Parameters
Returns
Promise<Buffer<ArrayBufferLike>>
Inherited from
MockProvider.downloadMedia
clearJournal()
seq counter keeps growing; outbox is untouched).
Returns
void
Inherited from
MockProvider.clearJournal
incoming()
Parameters
Returns
void
Inherited from
MockProvider.incoming
incomingMedia()
type: kind, body = caption). source bytes are
what downloadMedia returns; { url } alone is metadata only, and the download
then rejects with MediaUnavailableError.
Parameters
Returns
void
Inherited from
MockProvider.incomingMedia
incomingLocation()
type: 'location', ctx.sharedLocation). The body is
the place name, else the address, else '' — as the real providers set it.
Parameters
Returns
void
Inherited from
MockProvider.incomingLocation
interaction()
kind defaults to 'button').
Parameters
Returns
void
Inherited from
MockProvider.interaction
reaction()
bot.on('reaction'), 'reaction' hooks). to is
the reacted message; the sender defaults to from (the chat), as in a DM.
Parameters
Returns
void
Inherited from
MockProvider.reaction
call()
bot.on('call') and the CALL
trigger receive). Reuse the same id to emit later updates of one call. For a
group call pass chatId (the group) and isGroup: true; from is the caller.
Parameters
Returns
void
Inherited from
MockProvider.call
crash()
send hangs forever.
Returns
void
send()
Parameters
Returns
Promise<SendResult<unknown>>
Overrides
MockProvider.send
Accessors
crashed
Get Signature
Returns
boolean