Abstract

ComponentBuilder

export declare abstract class ComponentBuilder<Component extends APIBaseComponent<ComponentType>> implements JSONEncodable<Component>
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.

Implements

JSONEncodable<Component>
NameConstraintsOptionalDefaultDescription
ComponentAPIBaseComponent<ComponentType>NoThe type of API data that is stored within the builder
ProtectedAbstractReadonly
clearId():this
Clears the id of this component, defaulting to a default incremented id.
setId(id):this
Sets the id of this component.
NameTypeOptionalDescription
idnumberNoThe id to use
Abstract
toJSON(validationOverride?):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.
NameTypeOptionalDescription
validationOverridebooleanYesForce validation to run/not run regardless of your global preference