# DefaultSubscriptions

`interface` in `core` · v0.2.1

<https://docs.seedcord.org/packages/core/0.2.1/interfaces/default-subscriptions>

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.

```ts
interface DefaultSubscriptions
```

## Properties

### handledException

```ts
handledException: {
    denial: Notice;
    uuid: UUID;
    routeId: string;
    source: FaultSource;
}
```

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

### interactionDispatched

```ts
interactionDispatched: {
    routeId: string;
    interactionId: string;
    kind: `${InteractionRoutes}`;
    outcome: DispatchOutcome;
    fallback: boolean;
    durationMs: number;
    queuedMs: number;
}
```

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

### responseAttempted

```ts
responseAttempted: { routeId: string; interactionId: string; method: WriteMethod; outcome: ResponseOutcome; durationMs: number; messageId: string | null; error?: Error; }
```

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.

### unhandledInteractionError

```ts
unhandledInteractionError: {
    error: Error;
}
```

Triggered when an interaction dispatch throws past the fault boundary.

### unknownException

```ts
unknownException: { uuid: UUID; error: Error; routeId: string; guild?: { id: string; name: string; } | undefined; user?: { id: string; username: string; } | undefined; metadata?: unknown; }
```

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