MessageActionRow
Represents an action row containing components, such as buttons or selects, to be added to a message.
Kind: global class
new MessageActionRow(data)
Section titled “new MessageActionRow(data)”| Param | Type | Description |
|---|---|---|
| data | Object | The data for the action row. |
| data.components | Array | The components to be added to the action row. |
messageActionRow.addComponents(…components) ⇒ MessageActionRow
Section titled “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.
| Param | Type | Description |
|---|---|---|
| …components | any | The components to be added to the action row. |
messageActionRow.setComponents(…components) ⇒ MessageActionRow
Section titled “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.
| Param | Type | Description |
|---|---|---|
| …components | any | The components to be set as the action row’s components. |
messageActionRow.validation() ⇒ void
Section titled “messageActionRow.validation() ⇒ void”Validates that the action row’s type is valid.
Kind: instance method of MessageActionRow
Throws:
TypeErrorIf the action row’s type is invalid.
messageActionRow.toJSON() ⇒ Object
Section titled “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.