Skip to content

ModalCapableInteraction

Defined in: sdk/js/src/interactions/base.ts:103

Interactions that may open a modal (commands and components, not modal submits).

new ModalCapableInteraction(raw): ModalCapableInteraction

Defined in: sdk/js/src/interactions/base.ts:32

Interaction

ModalCapableInteraction

RepliableInteraction.constructor

readonly appPermissions: bigint

Defined in: sdk/js/src/interactions/base.ts:20

The bot’s effective permissions in the channel.

RepliableInteraction.appPermissions


readonly botId: string

Defined in: sdk/js/src/interactions/base.ts:15

The bot’s id in this community.

RepliableInteraction.botId


readonly channelId: string

Defined in: sdk/js/src/interactions/base.ts:16

RepliableInteraction.channelId


readonly createdTimestamp: number

Defined in: sdk/js/src/interactions/base.ts:24

When the host received it, ms.

RepliableInteraction.createdTimestamp


deferred: boolean = false

Defined in: sdk/js/src/interactions/base.ts:30

Whether the response was deferred.

RepliableInteraction.deferred


readonly id: string

Defined in: sdk/js/src/interactions/base.ts:13

The interaction id.

RepliableInteraction.id


readonly locale: string

Defined in: sdk/js/src/interactions/base.ts:22

The invoker’s locale (BCP 47), if their client sent one.

RepliableInteraction.locale


readonly member: Member

Defined in: sdk/js/src/interactions/base.ts:18

Who triggered it: interaction.member.send(...) sends them a DM.

RepliableInteraction.member


readonly raw: Interaction

Defined in: sdk/js/src/interactions/base.ts:26

The WIT interaction, for anything the classes do not expose.

RepliableInteraction.raw


replied: boolean = false

Defined in: sdk/js/src/interactions/base.ts:28

Whether an initial response was sent.

RepliableInteraction.replied

get userId(): string

Defined in: sdk/js/src/interactions/base.ts:44

The invoker’s member id.

string

RepliableInteraction.userId

deferReply(options?): void

Defined in: sdk/js/src/interactions/base.ts:81

Shows “thinking…” and buys 15 minutes; finish with editReply.

boolean

void

RepliableInteraction.deferReply


deleteReply(): void

Defined in: sdk/js/src/interactions/base.ts:92

Deletes the original response.

void

RepliableInteraction.deleteReply


editReply(payload): void

Defined in: sdk/js/src/interactions/base.ts:87

Replaces the original response (ends a deferred reply).

MessagePayload

void

RepliableInteraction.editReply


followUp(payload): string

Defined in: sdk/js/src/interactions/base.ts:97

Another message, within 15 minutes (at most 10).

MessagePayload

string

RepliableInteraction.followUp


isAnySelectMenu(): boolean

Defined in: sdk/js/src/interactions/base.ts:67

boolean

RepliableInteraction.isAnySelectMenu


isAutocomplete(): boolean

Defined in: sdk/js/src/interactions/base.ts:69

boolean

RepliableInteraction.isAutocomplete


isButton(): boolean

Defined in: sdk/js/src/interactions/base.ts:61

boolean

RepliableInteraction.isButton


isChannelSelectMenu(): boolean

Defined in: sdk/js/src/interactions/base.ts:66

boolean

RepliableInteraction.isChannelSelectMenu


isChatInputCommand(): boolean

Defined in: sdk/js/src/interactions/base.ts:55

boolean

RepliableInteraction.isChatInputCommand


isCommand(): boolean

Defined in: sdk/js/src/interactions/base.ts:59

boolean

RepliableInteraction.isCommand


isContextMenuCommand(): boolean

Defined in: sdk/js/src/interactions/base.ts:56

boolean

RepliableInteraction.isContextMenuCommand


isMentionableSelectMenu(): boolean

Defined in: sdk/js/src/interactions/base.ts:65

boolean

RepliableInteraction.isMentionableSelectMenu


isMessageComponent(): boolean

Defined in: sdk/js/src/interactions/base.ts:60

boolean

RepliableInteraction.isMessageComponent


isMessageContextMenuCommand(): boolean

Defined in: sdk/js/src/interactions/base.ts:58

boolean

RepliableInteraction.isMessageContextMenuCommand


isModalSubmit(): boolean

Defined in: sdk/js/src/interactions/base.ts:68

boolean

RepliableInteraction.isModalSubmit


isRepliable(): boolean

Defined in: sdk/js/src/interactions/base.ts:70

boolean

RepliableInteraction.isRepliable


isRoleSelectMenu(): boolean

Defined in: sdk/js/src/interactions/base.ts:64

boolean

RepliableInteraction.isRoleSelectMenu


isStringSelectMenu(): boolean

Defined in: sdk/js/src/interactions/base.ts:62

boolean

RepliableInteraction.isStringSelectMenu


isUserContextMenuCommand(): boolean

Defined in: sdk/js/src/interactions/base.ts:57

boolean

RepliableInteraction.isUserContextMenuCommand


isUserSelectMenu(): boolean

Defined in: sdk/js/src/interactions/base.ts:63

boolean

RepliableInteraction.isUserSelectMenu


reply(payload): string

Defined in: sdk/js/src/interactions/base.ts:76

Answers with a message in the channel (or only to the invoker with ephemeral).

MessagePayload

string

RepliableInteraction.reply


showModal(modal): void

Defined in: sdk/js/src/interactions/base.ts:105

Opens a modal for the invoker.

ModalBuilder

void