class ComponentBuilder

abstract
export declare abstract class ComponentBuilder<DataType extends Partial<APIBaseComponent<ComponentType>> = APIBaseComponent<ComponentType>> implements JSONEncodable<AnyAPIActionRowComponent>

The base component builder that contains common symbols for all sorts of components.

Constructors

constructor(
data: Partial<DataType>
)

Constructs a new kind of component.

Type Parameters

optional
DataType? extends Partial<APIBaseComponent<ComponentType>> = APIBaseComponent<ComponentType>

The type of internal API data that is stored within the component

readonly
data : Partial<DataType>

The API data associated with this component.

abstract
toJSON() : AnyAPIActionRowComponent

Serializes this builder to API-compatible JSON data.