Skip to content

ChatInputCommandInteraction

Defined in: sdk/js/src/interactions/command.ts:36

/command.

  • CommandInteraction

new ChatInputCommandInteraction(raw, data): ChatInputCommandInteraction

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

Interaction

CommandData

ChatInputCommandInteraction

CommandInteraction.constructor

readonly appPermissions: bigint

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

The bot’s effective permissions in the channel.

CommandInteraction.appPermissions


readonly botId: string

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

The bot’s id in this community.

CommandInteraction.botId


readonly channelId: string

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

CommandInteraction.channelId


readonly command: CommandData

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

The WIT command data.

CommandInteraction.command


readonly commandId: string

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

CommandInteraction.commandId


readonly commandName: string

Defined in: sdk/js/src/interactions/command.ts:21

CommandInteraction.commandName


readonly createdTimestamp: number

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

When the host received it, ms.

CommandInteraction.createdTimestamp


deferred: boolean = false

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

Whether the response was deferred.

CommandInteraction.deferred


readonly id: string

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

The interaction id.

CommandInteraction.id


readonly locale: string

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

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

CommandInteraction.locale


readonly member: Member

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

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

CommandInteraction.member


readonly options: CommandInteractionOptionResolver

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

CommandInteraction.options


readonly raw: Interaction

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

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

CommandInteraction.raw


replied: boolean = false

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

Whether an initial response was sent.

CommandInteraction.replied

get userId(): string

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

The invoker’s member id.

string

CommandInteraction.userId

deferReply(options?): void

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

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

boolean

void

CommandInteraction.deferReply


deleteReply(): void

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

Deletes the original response.

void

CommandInteraction.deleteReply


editReply(payload): void

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

Replaces the original response (ends a deferred reply).

MessagePayload

void

CommandInteraction.editReply


followUp(payload): string

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

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

MessagePayload

string

CommandInteraction.followUp


isAnySelectMenu(): boolean

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

boolean

CommandInteraction.isAnySelectMenu


isAutocomplete(): boolean

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

boolean

CommandInteraction.isAutocomplete


isButton(): boolean

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

boolean

CommandInteraction.isButton


isChannelSelectMenu(): boolean

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

boolean

CommandInteraction.isChannelSelectMenu


isChatInputCommand(): this is ChatInputCommandInteraction

Defined in: sdk/js/src/interactions/command.ts:37

this is ChatInputCommandInteraction

CommandInteraction.isChatInputCommand


isCommand(): boolean

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

boolean

CommandInteraction.isCommand


isContextMenuCommand(): boolean

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

boolean

CommandInteraction.isContextMenuCommand


isMentionableSelectMenu(): boolean

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

boolean

CommandInteraction.isMentionableSelectMenu


isMessageComponent(): boolean

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

boolean

CommandInteraction.isMessageComponent


isMessageContextMenuCommand(): boolean

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

boolean

CommandInteraction.isMessageContextMenuCommand


isModalSubmit(): boolean

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

boolean

CommandInteraction.isModalSubmit


isRepliable(): boolean

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

boolean

CommandInteraction.isRepliable


isRoleSelectMenu(): boolean

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

boolean

CommandInteraction.isRoleSelectMenu


isStringSelectMenu(): boolean

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

boolean

CommandInteraction.isStringSelectMenu


isUserContextMenuCommand(): boolean

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

boolean

CommandInteraction.isUserContextMenuCommand


isUserSelectMenu(): boolean

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

boolean

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

CommandInteraction.reply


showModal(modal): void

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

Opens a modal for the invoker.

ModalBuilder

void

CommandInteraction.showModal