class ComponentBuilder

abstract
export declare abstract class ComponentBuilder<Component extends APIBaseComponent<ComponentType>> implements JSONEncodable<Component>

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

Type Parameters

Component extends APIBaseComponent<ComponentType>

The type of API data that is stored within the builder

protectedabstractreadonly
data : ComponentBuilderBaseData

clearId() : this

Clears the id of this component, defaulting to a default incremented id.

setId(
id: number
) : this

Sets the id of this component.

abstract
toJSON(
validationOverride?: boolean
) : Component

Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.