DiscordInteractionsHandlerOptions
Defined in: packages/platform-discord/src/http/handler.ts:53
The public HTTP handler options.
Properties
Section titled “Properties”autocomplete?
Section titled “autocomplete?”
readonlyoptionalautocomplete?: (interaction) =>Effect<readonlyobject[]>
Defined in: packages/platform-discord/src/http/handler.ts:90
Handles autocomplete interactions; return the suggested choices.
Parameters
Section titled “Parameters”interaction
Section titled “interaction”RestInteraction
Returns
Section titled “Returns”Effect<readonly object[]>
background?
Section titled “background?”
readonlyoptionalbackground?: (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.
Parameters
Section titled “Parameters”Effect<void>
Returns
Section titled “Returns”Effect<void>
client
Section titled “client”
readonlyclient:InteractionsClientShape
Defined in: packages/platform-discord/src/http/handler.ts:54
defer?
Section titled “defer?”
readonlyoptionaldefer?: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.
firstFrameTimeout?
Section titled “firstFrameTimeout?”
readonlyoptionalfirstFrameTimeout?: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.
maxBodyBytes?
Section titled “maxBodyBytes?”
readonlyoptionalmaxBodyBytes?:number
Defined in: packages/platform-discord/src/http/handler.ts:88
Maximum body bytes accepted before signature verification. Defaults to 1 MiB.
onError?
Section titled “onError?”
readonlyoptionalonError?: (error) =>void
Defined in: packages/platform-discord/src/http/handler.ts:86
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”void
publicKey
Section titled “publicKey”
readonlypublicKey:string
Defined in: packages/platform-discord/src/http/handler.ts:56
The application’s Ed25519 public key, hex.
verify?
Section titled “verify?”
readonlyoptionalverify?: (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.
Parameters
Section titled “Parameters”options
Section titled “options”string
publicKey
Section titled “publicKey”string
signature
Section titled “signature”string
timestamp
Section titled “timestamp”string
Returns
Section titled “Returns”Effect<boolean>