Skip to content

MessageComponentInteraction

MessageComponentInteraction ⇐ Interaction

Represents a message component interaction.

Kind: global class
Extends: Interaction

new MessageComponentInteraction([data], guildId, client)

Constructs a new instance of the Component class.

ParamTypeDescription
[data]ObjectThe data object containing component information.
guildIdstringThe ID of the guild the component belongs to.
clientClientThe client instance.

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.

ParamTypeDescription
optionsObjectAdditional options for the deferred update.

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.
ParamTypeDescription
[options]ObjectThe options to update the interaction.