ActionRowBuilder

export class ActionRowBuilder<T extends AnyComponentBuilder = AnyComponentBuilder> extends BuilderActionRow<T>
export class ActionRowBuilder<T extends AnyComponentBuilder = AnyComponentBuilder> extends BuilderActionRow<T>
Represents an action row builder.
NameConstraintsOptionalDefaultDescription
TAnyComponentBuilderYesAnyComponentBuilderNone
constructor(data?)
Constructs a new instance of the ActionRowBuilder class
Readonly
components:T[]
The components within this action row.
Readonly
data:Partial<DataType>
The API data associated with this component.
Inherited from ComponentBuilder
addComponents(...components):this
Adds components to this action row.
NameTypeOptionalDescription
...componentsRestOrArray<T>NoThe components to add
Static
from(other):ActionRowBuilder<T>
Creates a new action row builder from JSON data
NameTypeOptionalDescription
other| JSONEncodable<APIActionRowComponent<ReturnType<T['toJSON']>>> | APIActionRowComponent<ReturnType<T['toJSON']>>NoThe other data
setComponents(...components):this
Sets components for this action row.
NameTypeOptionalDescription
...componentsRestOrArray<T>NoThe components to set
toJSON():APIActionRowComponent<ReturnType<T['toJSON']>>
Serializes this builder to API-compatible JSON data.
Remarks
This method runs validations on the data before serializing it. As such, it may throw an error if the data is invalid.