MessageComponentInteraction
MessageComponentInteraction ⇐ Interaction
Section titled “MessageComponentInteraction ⇐ Interaction”Represents a message component interaction.
Kind: global class
Extends: Interaction
- MessageComponentInteraction ⇐
Interaction- new MessageComponentInteraction([data], guildId, client)
- .deferUpdate(options) ⇒
Promise - .update([options]) ⇒
Promise.<(null|Message)>
new MessageComponentInteraction([data], guildId, client)
Section titled “new MessageComponentInteraction([data], guildId, client)”Constructs a new instance of the Component class.
| Param | Type | Description |
|---|---|---|
| [data] | Object | The data object containing component information. |
| guildId | string | The ID of the guild the component belongs to. |
| client | Client | The client instance. |
messageComponentInteraction.deferUpdate(options) ⇒ Promise
Section titled “messageComponentInteraction.deferUpdate(options) ⇒ Promise”Defers the update of an interaction callback and sends a response to the interaction.
Kind: instance method of MessageComponentInteraction
Returns: Promise - A promise that resolves when the update is deferred and the response is sent.
| Param | Type | Description |
|---|---|---|
| options | Object | Additional options for the deferred update. |
messageComponentInteraction.update([options]) ⇒ Promise.<(null|Message)>
Section titled “messageComponentInteraction.update([options]) ⇒ Promise.<(null|Message)>”Updates the interaction with the specified options.
Kind: instance method of MessageComponentInteraction
Returns: Promise.<(null|Message)> - - A promise that resolves to null or a Message object.
Throws:
Error- If there is an error while updating the interaction.
| Param | Type | Description |
|---|---|---|
| [options] | Object | The options to update the interaction. |