Skip to content

InteractionResponse

Defined in: packages/structures/src/interactions.ts:121

A Discord interaction callback payload.

new InteractionResponse(type, data?): InteractionResponse

Defined in: packages/structures/src/interactions.ts:127

Creates a response payload.

number

Discord callback type.

InteractionReplyOptions

Optional callback data.

InteractionResponse

If type is not finite.

readonly optional data?: InteractionReplyOptions

Defined in: packages/structures/src/interactions.ts:123


readonly type: number

Defined in: packages/structures/src/interactions.ts:122


withResponse: boolean = false

Defined in: packages/structures/src/interactions.ts:125

Ask Discord to return the created message (?with_response=true); not part of the body.

toJSON(): object

Defined in: packages/structures/src/interactions.ts:134

Serializes the response for Discord.

object

Discord callback payload.

optional data?: InteractionReplyOptions

type: number


static defer(ephemeral?): InteractionResponse

Defined in: packages/structures/src/interactions.ts:152

Creates a deferred channel response.

boolean = false

Whether the eventual response is ephemeral.

InteractionResponse

Callback payload.


static message(options): InteractionResponse

Defined in: packages/structures/src/interactions.ts:143

Creates an immediate message response.

InteractionReplyOptions

Response message options.

InteractionResponse

Callback payload.


static pong(): InteractionResponse

Defined in: packages/structures/src/interactions.ts:159

Creates a Pong response.

InteractionResponse

Callback payload.