Row
Extends
Type Parameters
Type Parameter | Default type |
---|---|
T extends BaseMessageInteractiveComponent | BaseModalComponent | BaseMessageInteractiveComponent |
Constructors
Constructor
new Row<
T
>(components?
):Row
<T
>
Parameters
Parameter | Type |
---|---|
components? | T [] |
Returns
Row
<T
>
Overrides
Properties
Property | Modifier | Type | Default value | Description | Overrides | Inherited from |
---|---|---|---|---|---|---|
components | public | T [] | [] | The components in the action row | - | - |
id? | public | number | undefined | 32 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 |
isV2 | readonly | false | false | Whether the component is a v2 component and requires the IS_COMPONENTS_V2 flag | BaseComponent .isV2 | - |
type | readonly | ActionRow | undefined | The type of the component | BaseComponent .type | - |
Methods
addComponent()
addComponent(
component
):void
Add a component to the action row
Parameters
Parameter | Type | Description |
---|---|---|
component | T | The 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
Parameter | Type | Description |
---|---|---|
component | T | The component to remove |
Returns
void
serialize()
serialize():
APIMessageComponent
|APIModalComponent
Returns
APIMessageComponent
| APIModalComponent
Overrides
BaseComponent.serialize