BotMessageTarget
Defined in: packages/core/src/message/target.ts:86
The shared target surface used by renderers and tests.
Extends
Section titled “Extends”MessageTarget<Message,Snapshot>
Type Parameters
Section titled “Type Parameters”Message
Section titled “Message”Message
Snapshot
Section titled “Snapshot”Snapshot
Properties
Section titled “Properties”message
Section titled “message”
readonlymessage:Message|null
Defined in: packages/core/src/message/target.ts:90
The first platform message if it already exists.
paint?
Section titled “paint?”
readonlyoptionalpaint?: (snapshot) =>Effect<Message,MessageTargetError>
Defined in: packages/core/src/message/target.ts:99
Sends one snapshot immediately, even while paused, and invalidates the live fingerprint so the next live snapshot is sent after resume.
Parameters
Section titled “Parameters”snapshot
Section titled “snapshot”Snapshot
Returns
Section titled “Returns”Effect<Message, MessageTargetError>
pause?
Section titled “pause?”
readonlyoptionalpause?: () =>void
Defined in: packages/core/src/message/target.ts:70
Stops draining queued snapshots until resume.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”platform
Section titled “platform”
readonlyplatform:string
Defined in: packages/core/src/message/target.ts:88
The platform this target sends to, such as discord or slack.
readonlyready:Effect<Message,MessageTargetError>
Defined in: packages/core/src/message/target.ts:57
The first platform message, once it has been created.
Inherited from
Section titled “Inherited from”resume?
Section titled “resume?”
readonlyoptionalresume?: () =>void
Defined in: packages/core/src/message/target.ts:72
Resumes draining the newest queued snapshot.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”
readonlyrun:Effect<never>
Defined in: packages/core/src/message/target.ts:62
Drains queued snapshots while the target is open. The effect stays alive
after close() so the owning mount scope controls when it ends.
Inherited from
Section titled “Inherited from”
readonlystate:TargetState
Defined in: packages/core/src/message/target.ts:92
The explicit send lifecycle state.
whenIdle
Section titled “whenIdle”
readonlywhenIdle:Effect<void>
Defined in: packages/core/src/message/target.ts:94
Resolves once no request is in flight and no snapshot is queued.
Methods
Section titled “Methods”close()
Section titled “close()”close():
void
Defined in: packages/core/src/message/target.ts:68
Stops future sends and fails ready if no message was created yet.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”fail()
Section titled “fail()”fail(
error):void
Defined in: packages/core/src/message/target.ts:66
Fails the in-flight attempt when the host cannot produce a snapshot.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”queue()
Section titled “queue()”queue(
snapshot):void
Defined in: packages/core/src/message/target.ts:64
Enqueues the newest snapshot. Safe to call from a host commit.
Parameters
Section titled “Parameters”snapshot
Section titled “snapshot”Snapshot
Returns
Section titled “Returns”void