Skip to content

RepliableInteraction

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

Interactions that can be answered with messages (all but autocomplete).

new RepliableInteraction(raw): RepliableInteraction

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

Interaction

RepliableInteraction

BaseInteraction.constructor

readonly appPermissions: bigint

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

The bot’s effective permissions in the channel.

BaseInteraction.appPermissions


readonly botId: string

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

The bot’s id in this community.

BaseInteraction.botId


readonly channelId: string

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

BaseInteraction.channelId


readonly createdTimestamp: number

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

When the host received it, ms.

BaseInteraction.createdTimestamp


deferred: boolean = false

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

Whether the response was deferred.

BaseInteraction.deferred


readonly id: string

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

The interaction id.

BaseInteraction.id


readonly locale: string

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

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

BaseInteraction.locale


readonly member: Member

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

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

BaseInteraction.member


readonly raw: Interaction

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

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

BaseInteraction.raw


replied: boolean = false

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

Whether an initial response was sent.

BaseInteraction.replied

get userId(): string

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

The invoker’s member id.

string

BaseInteraction.userId

deferReply(options?): void

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

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

boolean

void


deleteReply(): void

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

Deletes the original response.

void


editReply(payload): void

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

Replaces the original response (ends a deferred reply).

MessagePayload

void


followUp(payload): string

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

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

MessagePayload

string


isAnySelectMenu(): boolean

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

boolean

BaseInteraction.isAnySelectMenu


isAutocomplete(): boolean

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

boolean

BaseInteraction.isAutocomplete


isButton(): boolean

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

boolean

BaseInteraction.isButton


isChannelSelectMenu(): boolean

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

boolean

BaseInteraction.isChannelSelectMenu


isChatInputCommand(): boolean

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

boolean

BaseInteraction.isChatInputCommand


isCommand(): boolean

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

boolean

BaseInteraction.isCommand


isContextMenuCommand(): boolean

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

boolean

BaseInteraction.isContextMenuCommand


isMentionableSelectMenu(): boolean

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

boolean

BaseInteraction.isMentionableSelectMenu


isMessageComponent(): boolean

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

boolean

BaseInteraction.isMessageComponent


isMessageContextMenuCommand(): boolean

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

boolean

BaseInteraction.isMessageContextMenuCommand


isModalSubmit(): boolean

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

boolean

BaseInteraction.isModalSubmit


isRepliable(): boolean

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

boolean

BaseInteraction.isRepliable


isRoleSelectMenu(): boolean

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

boolean

BaseInteraction.isRoleSelectMenu


isStringSelectMenu(): boolean

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

boolean

BaseInteraction.isStringSelectMenu


isUserContextMenuCommand(): boolean

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

boolean

BaseInteraction.isUserContextMenuCommand


isUserSelectMenu(): boolean

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

boolean

BaseInteraction.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