Search...

ActionRowBuilder

export declare class ActionRowBuilder<T extends AnyComponentBuilder> extends ComponentBuilder<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>> 
export declare class ActionRowBuilder<T extends AnyComponentBuilder> extends ComponentBuilder<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>> 
Represents an action row component

Extends

ComponentBuilder<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>>
NameConstraintsOptionalDefaultDescription
TAnyComponentBuilderNoThe types of components this action row holds

constructor({ components, ...data }?)

Constructs a new instance of the ActionRowBuilder class
NameTypeOptionalDescription
{ components, ...data }Partial<APIActionRowComponent<APIActionRowComponentTypes>>YesNone
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 to this action row.

setComponents(components)

:

this

Sets the components in this action row
NameTypeOptionalDescription
componentsRestOrArray<T>NoThe components to set this row to

toJSON()

:

APIActionRowComponent<ReturnType<T['toJSON']>>

Serializes this component to an API-compatible JSON object
Remarks
This method runs validations on the data before serializing it. As such, it may throw an error if the data is invalid.