Skip to content
Interfacecorev0.10.0

DefaultSubscriptions

The framework's own subscription keys. A transport adds a key whose payload type references a type outside this package, through declaration merging on its own module.

Every key here is publish-protected. Subscribe to them. The framework is the only publisher.

interface DefaultSubscriptions

handledException

Triggered when a reported Notice (report: true) is caught.

readonly handledException: { readonly denial: Notice; readonly uuid: UUID; readonly dispatchId: string; readonly origin: string; readonly source: FaultSource; }

interactionDispatched

Triggered once per interaction dispatch, after the handler chain settles.

readonly interactionDispatched: { readonly dispatchId: string; readonly routeId: string; readonly interactionId: string; readonly kind: `${InteractionKind}`; readonly outcome: DispatchOutcome; readonly fallback: boolean; readonly userId: string | null; readonly guildId: string | null; readonly durationMs: number; readonly queuedMs: number; }

responseAttempted

Triggered on every write through the reply surface, several times per interaction. A write that throws reports here too, with outcome failed. A write that reaches Discord and then returns an unexpected shape publishes nothing, since the callback succeeded and carries no message to name.

readonly responseAttempted: ResponseAttempt

unhandledInteractionError

Triggered when an interaction dispatch throws past the fault boundary.

readonly unhandledInteractionError: { readonly error: Error; }

unknownException

Triggered when an unhandled exception (a raw non-Notice throw) occurs.

readonly unknownException: { readonly uuid: UUID; readonly dispatchId: string | null; readonly error: Error; readonly origin: string; readonly guild?: { readonly id: string; readonly name: string; } | undefined; readonly user?: { readonly id: string; readonly username: string; } | undefined; readonly metadata?: unknown; }