MessageActionRow
classe · Source
Represents an action row containing message components.
Extends: BaseMessageComponent
Constructor
new MessageActionRow(data?: MessageActionRow | MessageActionRowOptions, client?: Client)
Parameters
| Name | Type | Description |
|---|---|---|
data? | MessageActionRow | MessageActionRowOptions | MessageActionRow to clone or raw data Default: {}. |
client? | Client | The client constructing this MessageActionRow, if provided Default: null. |
Properties
components
components: Array<MessageActionRowComponent>
The components in this action row Source
type
nullable
type: MessageComponentType
The type of this component Source
data
data: MessageComponentOptions
The data for this component Source
id
readonly
id: number
The id of this component Source
Methods
addComponents
addComponents(components: Array<MessageActionRowComponentResolvable>): MessageActionRow
Adds components to the action row. Parameters
| Name | Type | Description |
|---|---|---|
components | Array<MessageActionRowComponentResolvable> | The components to add |
Returns: MessageActionRowSource
setComponents
setComponents(components: Array<MessageActionRowComponentResolvable>): MessageActionRow
Sets the components of the action row. Parameters
| Name | Type | Description |
|---|---|---|
components | Array<MessageActionRowComponentResolvable> | The components to set |
Returns: MessageActionRowSource
spliceComponents
spliceComponents(index: number, deleteCount: number, components?: Array<MessageActionRowComponentResolvable>): MessageActionRow
Removes, replaces, and inserts components in the action row. Parameters
| Name | Type | Description |
|---|---|---|
index | number | The index to start at |
deleteCount | number | The number of components to remove |
components? | Array<MessageActionRowComponentResolvable> | The replacing components |
Returns: MessageActionRowSource
toJSON
toJSON(): APIMessageComponent
Transforms the action row to a plain object. Returns: APIMessageComponent — The raw data of this action row Source