Carbon
Core/Classes

Row

Extends

Type Parameters

Constructors

Constructor

new Row<T>(components?): Row<T>

Parameters

ParameterType
components?T[]

Returns

Row<T>

Overrides

BaseComponent.constructor

Properties

PropertyModifierTypeDefault valueDescriptionOverridesInherited from
componentspublicT[][]The components in the action row--
id?publicnumberundefined32 bit integer used as an optional identifier for component The id field is optional and is used to identify components in the response from an interaction that aren't interactive components. The id must be unique within the message and is generated sequentially by Discord if left empty. Generation of ids won't use another id that exists in the message if you have one defined for another component.-BaseComponent.id
isV2readonlyfalsefalseWhether the component is a v2 component and requires the IS_COMPONENTS_V2 flagBaseComponent.isV2-
typereadonlyActionRowundefinedThe type of the componentBaseComponent.type-

Methods

addComponent()

addComponent(component): void

Add a component to the action row

Parameters

ParameterTypeDescription
componentTThe component to add

Returns

void


removeAllComponents()

removeAllComponents(): void

Remove all components from the action row

Returns

void


removeComponent()

removeComponent(component): void

Remove a component from the action row

Parameters

ParameterTypeDescription
componentTThe component to remove

Returns

void


serialize()

serialize(): APIMessageComponent | APIModalComponent

Returns

APIMessageComponent | APIModalComponent

Overrides

BaseComponent.serialize

On this page