Skip to content

MessageActionRow

MessageActionRow

Represents an action row containing components, such as buttons or selects, to be added to a message.

Kind: global class

new MessageActionRow(data)

ParamTypeDescription
dataObjectThe data for the action row.
data.componentsArrayThe components to be added to the action row.

messageActionRow.addComponents(…components) ⇒ MessageActionRow

Adds one or more components to the action row.

Kind: instance method of MessageActionRow
Returns: MessageActionRow - - The action row with the new components added.

ParamTypeDescription
…componentsanyThe components to be added to the action row.

messageActionRow.setComponents(…components) ⇒ MessageActionRow

Sets the components of the action row.

Kind: instance method of MessageActionRow
Returns: MessageActionRow - - The action row with the new components set.

ParamTypeDescription
…componentsanyThe components to be set as the action row’s components.

messageActionRow.validation() ⇒ void

Validates that the action row’s type is valid.

Kind: instance method of MessageActionRow
Throws:

  • TypeError If the action row’s type is invalid.

messageActionRow.toJSON() ⇒ Object

Returns the action row’s data in JSON format.

Kind: instance method of MessageActionRow
Returns: Object - - The action row’s data in JSON format.