export declare class ActionRowBuilder<ComponentType extends AnyComponentBuilder> extends ComponentBuilder<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>>
A builder that creates API-compatible JSON data for action rows.
Constructors
Creates a new action row from API data.
Examples:Creating an action row from an API data object:Creating an action row using setters and API data:
const actionRow = new ActionRowBuilder({
components: [
{
custom_id: "custom id",
label: "Type something",
style: TextInputStyle.Short,
type: ComponentType.TextInput,
},
],
});
const actionRow = new ActionRowBuilder({
components: [
{
custom_id: "custom id",
label: "Click me",
style: ButtonStyle.Primary,
type: ComponentType.Button,
},
],
})
.addComponents(button2, button3);
Type Parameters
AnyComponentBuilder ComponentType extends
The types of components this action row holds
readonlyPartial<APIActionRowComponent> data :
The API data associated with this component.
Inherited from: ComponentBuilder
addComponents...components: RestOrArray<ComponentType>) : this (
...components: RestOrArray<ComponentType>
Adds components to this action row.
setComponents...components: RestOrArray<ComponentType>) : this (
...components: RestOrArray<ComponentType>
Sets components for this action row.
toJSONAPIActionRowComponent<ReturnType<ComponentType['toJSON']>> () :
Serializes this builder to API-compatible JSON data.