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
1Methods
4Properties
components: FixedComponents<T>[];Methods
constructorConstructorconstructor({ components, ...data }?: Partial<APIActionRowComponent<APIActionRowComponentTypes>>);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]);toJSON(): APIActionRowComponent<APIMessageActionRowComponent>;Converts the Action Row to its JSON representation.
Returns
The JSON representation of the Action Row.