MessageComponentInteraction
Defined in: sdk/js/src/interactions/component.ts:17
A click on a button or a choice in a select.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MessageComponentInteraction(
raw,data):MessageComponentInteraction
Defined in: sdk/js/src/interactions/component.ts:25
Parameters
Section titled “Parameters”Interaction
ComponentData
Returns
Section titled “Returns”MessageComponentInteraction
Overrides
Section titled “Overrides”ModalCapableInteraction.constructor
Properties
Section titled “Properties”appPermissions
Section titled “appPermissions”
readonlyappPermissions:bigint
Defined in: sdk/js/src/interactions/base.ts:20
The bot’s effective permissions in the channel.
Inherited from
Section titled “Inherited from”ModalCapableInteraction.appPermissions
readonlybotId:string
Defined in: sdk/js/src/interactions/base.ts:15
The bot’s id in this community.
Inherited from
Section titled “Inherited from”channelId
Section titled “channelId”
readonlychannelId:string
Defined in: sdk/js/src/interactions/base.ts:16
Inherited from
Section titled “Inherited from”ModalCapableInteraction.channelId
component
Section titled “component”
readonlycomponent:ComponentData
Defined in: sdk/js/src/interactions/component.ts:23
The WIT component data.
componentType
Section titled “componentType”
readonlycomponentType:number
Defined in: sdk/js/src/interactions/component.ts:19
createdTimestamp
Section titled “createdTimestamp”
readonlycreatedTimestamp:number
Defined in: sdk/js/src/interactions/base.ts:24
When the host received it, ms.
Inherited from
Section titled “Inherited from”ModalCapableInteraction.createdTimestamp
customId
Section titled “customId”
readonlycustomId:string
Defined in: sdk/js/src/interactions/component.ts:18
deferred
Section titled “deferred”deferred:
boolean=false
Defined in: sdk/js/src/interactions/base.ts:30
Whether the response was deferred.
Inherited from
Section titled “Inherited from”ModalCapableInteraction.deferred
readonlyid:string
Defined in: sdk/js/src/interactions/base.ts:13
The interaction id.
Inherited from
Section titled “Inherited from”locale
Section titled “locale”
readonlylocale:string
Defined in: sdk/js/src/interactions/base.ts:22
The invoker’s locale (BCP 47), if their client sent one.
Inherited from
Section titled “Inherited from”ModalCapableInteraction.locale
member
Section titled “member”
readonlymember:Member
Defined in: sdk/js/src/interactions/base.ts:18
Who triggered it: interaction.member.send(...) sends them a DM.
Inherited from
Section titled “Inherited from”ModalCapableInteraction.member
message
Section titled “message”
readonlymessage:Message
Defined in: sdk/js/src/interactions/component.ts:21
The message holding the component.
readonlyraw:Interaction
Defined in: sdk/js/src/interactions/base.ts:26
The WIT interaction, for anything the classes do not expose.
Inherited from
Section titled “Inherited from”replied
Section titled “replied”replied:
boolean=false
Defined in: sdk/js/src/interactions/base.ts:28
Whether an initial response was sent.
Inherited from
Section titled “Inherited from”ModalCapableInteraction.replied
Accessors
Section titled “Accessors”userId
Section titled “userId”Get Signature
Section titled “Get Signature”get userId():
string
Defined in: sdk/js/src/interactions/base.ts:44
The invoker’s member id.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”ModalCapableInteraction.userId
values
Section titled “values”Get Signature
Section titled “Get Signature”get values():
string[]
Defined in: sdk/js/src/interactions/component.ts:46
Chosen values of a select (option values or ids).
Returns
Section titled “Returns”string[]
Methods
Section titled “Methods”deferReply()
Section titled “deferReply()”deferReply(
options?):void
Defined in: sdk/js/src/interactions/base.ts:81
Shows “thinking…” and buys 15 minutes; finish with editReply.
Parameters
Section titled “Parameters”options?
Section titled “options?”ephemeral?
Section titled “ephemeral?”boolean
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ModalCapableInteraction.deferReply
deferUpdate()
Section titled “deferUpdate()”deferUpdate():
void
Defined in: sdk/js/src/interactions/component.ts:56
Acknowledges the click without changing anything yet; finish with editReply.
Returns
Section titled “Returns”void
deleteReply()
Section titled “deleteReply()”deleteReply():
void
Defined in: sdk/js/src/interactions/base.ts:92
Deletes the original response.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ModalCapableInteraction.deleteReply
editReply()
Section titled “editReply()”editReply(
payload):void
Defined in: sdk/js/src/interactions/base.ts:87
Replaces the original response (ends a deferred reply).
Parameters
Section titled “Parameters”payload
Section titled “payload”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ModalCapableInteraction.editReply
followUp()
Section titled “followUp()”followUp(
payload):string
Defined in: sdk/js/src/interactions/base.ts:97
Another message, within 15 minutes (at most 10).
Parameters
Section titled “Parameters”payload
Section titled “payload”Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”ModalCapableInteraction.followUp
isAnySelectMenu()
Section titled “isAnySelectMenu()”isAnySelectMenu():
boolean
Defined in: sdk/js/src/interactions/component.ts:40
Returns
Section titled “Returns”boolean
Overrides
Section titled “Overrides”ModalCapableInteraction.isAnySelectMenu
isAutocomplete()
Section titled “isAutocomplete()”isAutocomplete():
boolean
Defined in: sdk/js/src/interactions/base.ts:69
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ModalCapableInteraction.isAutocomplete
isButton()
Section titled “isButton()”isButton():
boolean
Defined in: sdk/js/src/interactions/component.ts:34
Returns
Section titled “Returns”boolean
Overrides
Section titled “Overrides”ModalCapableInteraction.isButton
isChannelSelectMenu()
Section titled “isChannelSelectMenu()”isChannelSelectMenu():
boolean
Defined in: sdk/js/src/interactions/component.ts:39
Returns
Section titled “Returns”boolean
Overrides
Section titled “Overrides”ModalCapableInteraction.isChannelSelectMenu
isChatInputCommand()
Section titled “isChatInputCommand()”isChatInputCommand():
boolean
Defined in: sdk/js/src/interactions/base.ts:55
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ModalCapableInteraction.isChatInputCommand
isCommand()
Section titled “isCommand()”isCommand():
boolean
Defined in: sdk/js/src/interactions/base.ts:59
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ModalCapableInteraction.isCommand
isContextMenuCommand()
Section titled “isContextMenuCommand()”isContextMenuCommand():
boolean
Defined in: sdk/js/src/interactions/base.ts:56
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ModalCapableInteraction.isContextMenuCommand
isMentionableSelectMenu()
Section titled “isMentionableSelectMenu()”isMentionableSelectMenu():
boolean
Defined in: sdk/js/src/interactions/component.ts:38
Returns
Section titled “Returns”boolean
Overrides
Section titled “Overrides”ModalCapableInteraction.isMentionableSelectMenu
isMessageComponent()
Section titled “isMessageComponent()”isMessageComponent():
this is MessageComponentInteraction
Defined in: sdk/js/src/interactions/component.ts:33
Returns
Section titled “Returns”this is MessageComponentInteraction
Overrides
Section titled “Overrides”ModalCapableInteraction.isMessageComponent
isMessageContextMenuCommand()
Section titled “isMessageContextMenuCommand()”isMessageContextMenuCommand():
boolean
Defined in: sdk/js/src/interactions/base.ts:58
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ModalCapableInteraction.isMessageContextMenuCommand
isModalSubmit()
Section titled “isModalSubmit()”isModalSubmit():
boolean
Defined in: sdk/js/src/interactions/base.ts:68
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ModalCapableInteraction.isModalSubmit
isRepliable()
Section titled “isRepliable()”isRepliable():
boolean
Defined in: sdk/js/src/interactions/base.ts:70
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ModalCapableInteraction.isRepliable
isRoleSelectMenu()
Section titled “isRoleSelectMenu()”isRoleSelectMenu():
boolean
Defined in: sdk/js/src/interactions/component.ts:37
Returns
Section titled “Returns”boolean
Overrides
Section titled “Overrides”ModalCapableInteraction.isRoleSelectMenu
isStringSelectMenu()
Section titled “isStringSelectMenu()”isStringSelectMenu():
boolean
Defined in: sdk/js/src/interactions/component.ts:35
Returns
Section titled “Returns”boolean
Overrides
Section titled “Overrides”ModalCapableInteraction.isStringSelectMenu
isUserContextMenuCommand()
Section titled “isUserContextMenuCommand()”isUserContextMenuCommand():
boolean
Defined in: sdk/js/src/interactions/base.ts:57
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ModalCapableInteraction.isUserContextMenuCommand
isUserSelectMenu()
Section titled “isUserSelectMenu()”isUserSelectMenu():
boolean
Defined in: sdk/js/src/interactions/component.ts:36
Returns
Section titled “Returns”boolean
Overrides
Section titled “Overrides”ModalCapableInteraction.isUserSelectMenu
reply()
Section titled “reply()”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).
Parameters
Section titled “Parameters”payload
Section titled “payload”Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”showModal()
Section titled “showModal()”showModal(
modal):void
Defined in: sdk/js/src/interactions/base.ts:105
Opens a modal for the invoker.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ModalCapableInteraction.showModal
update()
Section titled “update()”update(
payload):void
Defined in: sdk/js/src/interactions/component.ts:51
Replaces the message holding the component (it must be the bot’s).
Parameters
Section titled “Parameters”payload
Section titled “payload”Returns
Section titled “Returns”void