Alias of chatId.
The chat this view drives (the user id on a DM, the group id on a group).
The simulated user (ctx.senderId).
Push name the simulated user shows (ctx.senderInfo.displayName).
Simulate an inbound message from this user, then yield one macrotask so the dispatch starts.
Optionalopts: { type?: MessageType }Simulate a shared location (ctx.sharedLocation, c.waitLocation()).
Optionalextra: Omit<InboundLocation, "latitude" | "longitude">Simulate an inbound media message: ctx.body is the caption, loadMediaOf(ctx) resolves
with the bytes. A { url } source without bytes makes the download reject with
MediaUnavailableError (the mock never touches the network).
Optionalcaption: string | MockMediaOptionsSimulate a reaction (bot.on('reaction'), 'reaction' hooks). Default target: the bot's
last message in this chat, else the user's last message. { removed: true } retracts it.
Optionaltarget: MessageRef | { to?: MessageRef; removed?: boolean }Simulate a raw interaction (provider.interaction): data is what ctx.body / ctx.interaction.data carry.
Optionalopts: { kind?: "list" | "button" | "command" | "modal" | "autocomplete"; id?: string }Press a native button, list row or card button of the LAST interactive message the bot sent
to this chat: by id, by title (case-insensitive) or 1-based index. The bot receives what a
real press produces (a 'buttons' message whose body is the id).
Resolve with the first reply matching matcher (already sent or arriving before the timeout).
OptionaltimeoutMs: numberResolve when no reply beyond the ones already consumed exists now nor arrives within
timeout (default 300 ms); reject listing the unexpected replies. Consumes nothing.
Optionalopts: number | { timeout?: number }Snapshot of all text/caption replies sent to this chat so far (buttons and lists: their text).
Every message the bot sent to this chat, with its full content and ref.
The last message the bot sent to this chat.
The exchange so far as a golden Transcript (same shape recordTranscript
produces: it parses, redacts and replays with assertTranscript). Deterministic by
default (no ids, no timestamps), so it fits toMatchSnapshot().
Optionalopts: TestTranscriptOptionsSame chat seen by another participant (groups). On a DM: another DM with the same bot.
Optionalopts: { displayName?: string }
A (chat, sender) view over the test bot. See createTestBot.