Skip to content

DiscordInteractionsHandlerOptions

Defined in: packages/platform-discord/src/http/handler.ts:53

The public HTTP handler options.

readonly optional autocomplete?: (interaction) => Effect<readonly object[]>

Defined in: packages/platform-discord/src/http/handler.ts:90

Handles autocomplete interactions; return the suggested choices.

RestInteraction

Effect<readonly object[]>


readonly optional background?: (work) => Effect<void>

Defined in: packages/platform-discord/src/http/handler.ts:85

Registers background work with the host runtime, such as Cloudflare’s ctx.waitUntil or a serverless request scope. Without it the work is forked on the handler’s runtime.

Effect<void>

Effect<void>


readonly client: InteractionsClientShape

Defined in: packages/platform-discord/src/http/handler.ts:54


readonly optional defer?: boolean

Defined in: packages/platform-discord/src/http/handler.ts:73

Acknowledge first and process in the background. This supports slow work but cannot open modals: a modal must be the initial response.


readonly optional firstFrameTimeout?: number | false

Defined in: packages/platform-discord/src/http/handler.ts:79

How long inline mode waits for its first response before switching to a deferred ack and finishing through REST. Defaults to 2 seconds; pass false to disable the budget. A modal cannot use the deferred fallback.


readonly optional maxBodyBytes?: number

Defined in: packages/platform-discord/src/http/handler.ts:88

Maximum body bytes accepted before signature verification. Defaults to 1 MiB.


readonly optional onError?: (error) => void

Defined in: packages/platform-discord/src/http/handler.ts:86

unknown

void


readonly publicKey: string

Defined in: packages/platform-discord/src/http/handler.ts:56

The application’s Ed25519 public key, hex.


readonly optional verify?: (options) => Effect<boolean>

Defined in: packages/platform-discord/src/http/handler.ts:61

Override signature verification on runtimes without Node’s crypto, such as a WebCrypto-based Cloudflare adapter.

string

string

string

string

Effect<boolean>