Skip to main content
Defined in: ops/trigger.ts:18 Options of bot.trigger(name, options): the target chat and user, the initial c.state and what to do when that user already has a conversation.

Properties

chatId

Defined in: ops/trigger.ts:20 Chat to run the conversation in (an opaque transport id, used as-is).

userId?

Defined in: ops/trigger.ts:22 Subject of the conversation (default: chatId). Required to target one participant of a group.

isGroup?

Defined in: ops/trigger.ts:24 Is chatId a group? (default false). With conversationScope: 'participant' it keys the conversation per userId.

data?

Defined in: ops/trigger.ts:26 Seeds c.state (shallow copy) — e.g. { cita: 'mañana 3pm' } → c.state.cita.

ifActive?

Defined in: ops/trigger.ts:32 What to do when the subject already has a live conversation or a dormant (persisted) checkpoint: 'skip' (default) leaves it alone and resolves { started: false, reason: 'busy' }; 'replace' cancels it and starts this one.

body?

Defined in: ops/trigger.ts:34 ctx.body of the synthetic triggering message (default '').