ActionRow

Represents an Action Row component in a message.

Signature

export declare class ActionRow<T extends ActionBuilderComponents = ActionBuilderComponents> extends BaseComponentBuilder<APIActionRowComponent<APIActionRowComponentTypes>>
JSDoc
@templateT - The type of components in the Action Row.

Properties

Methods

addComponents(...component: RestOrArray<FixedComponents<T>>): this;

Adds one or more components to the Action Row.

Parameters
component
The component(s) to add.
Returns

The updated Action Row instance.

Examples
actionRow.addComponents(buttonComponent);
actionRow.addComponents(buttonComponent1, buttonComponent2);
actionRow.addComponents([buttonComponent1, buttonComponent2]);
setComponents(...component: RestOrArray<FixedComponents<T>>): this;

Sets the components of the Action Row.

Parameters
component
The components to set.
Returns

The updated Action Row instance.

Examples
actionRow.setComponents([buttonComponent1, buttonComponent2]);