Skip to content

SessionMountOptions

Defined in: packages/platform-discord/src/render/session.ts:127

  • MountWireOptions<LayerR, LayerE>

LayerR = never

LayerE = never

readonly optional build?: string

Defined in: packages/platform-discord/src/render/session.ts:138

Application build fingerprint. Empty means “do not check”.


readonly componentKey: string

Defined in: packages/platform-discord/src/render/session.ts:132

Key the client uses to resolve the component again after a restart.


readonly optional ephemeral?: boolean

Defined in: packages/platform-discord/src/types.ts:30

Reply ephemerally. Only applies to interactions.

MountWireOptions.ephemeral


readonly optional id?: string

Defined in: packages/platform-discord/src/render/session.ts:139


readonly optional interactionRetryMs?: number

Defined in: packages/platform-discord/src/render/session.ts:149

Delay between lease attempts while waiting. Defaults to 50 ms.


readonly optional interactionWindowMs?: number

Defined in: packages/platform-discord/src/render/session.ts:147

How long an interaction waits for a busy writer before it is dropped. Defaults to 1 second, well inside Discord’s callback budget.


readonly optional layer?: Layer<any, LayerE, LayerR>

Defined in: packages/platform-discord/src/render/session.ts:40

Application layers for the component tree. Requirements and errors propagate to the mount effect instead of being erased.

MountWireOptions.layer


readonly optional leaseTtlMs?: number

Defined in: packages/platform-discord/src/render/session.ts:142

How long an interaction lease is held. Defaults to 10 seconds.


readonly optional paintLayer?: Layer<any, never, never>

Defined in: packages/platform-discord/src/render/session.ts:46

A self-contained layer for time travel. Paint runs outside the mount, so it cannot provide application requirements; pass this when layer needs services if the message should stay paintable.

MountWireOptions.paintLayer


readonly optional resume?: DiscordMessage

Defined in: packages/platform-discord/src/types.ts:34

Continue this message instead of creating a new one.

MountWireOptions.resume


readonly optional session?: object

Defined in: packages/platform-discord/src/render/session.ts:134

Resume an existing record. Without it a new record is created.

readonly build: string = Schema.String

Application build fingerprint. Empty means “do not check”.

readonly component: string = Schema.String

Registered component key, resolved by the platform integration.

readonly createdAt: number = Schema.Finite

readonly ephemeral: boolean = Schema.Boolean

readonly optional expiresAt?: number

readonly id: string = Schema.String

readonly optional lastInteractionId?: string

readonly optional message?: object

readonly optional channelId?: string

readonly optional guildId?: string

readonly id: string = Schema.String

readonly props: unknown = Schema.Unknown

readonly optional state?: object

[key: string]: unknown

readonly status: "closed" | "pending" | "active"

readonly updatedAt: number = Schema.Finite

readonly version: number = Schema.Int

The state version the message on the platform shows. Bumped per interaction.


readonly optional sessionProps?: unknown

Defined in: packages/platform-discord/src/render/session.ts:136

Props to persist; defaults to the live props argument.


readonly optional skipInitial?: boolean

Defined in: packages/platform-discord/src/types.ts:39

With resume, drop the first restored render. The caller is about to apply an interaction, so only the post-interaction state should be sent.

MountWireOptions.skipInitial


readonly optional state?: State

Defined in: packages/platform-discord/src/render/session.ts:48

Models from Root.snapshot to resume from.

MountWireOptions.state


readonly optional ttl?: number

Defined in: packages/platform-discord/src/render/session.ts:140


readonly optional unmountAfter?: Input

Defined in: packages/platform-discord/src/types.ts:32

Unmount after this many milliseconds.

MountWireOptions.unmountAfter