Discord.https - v3.0.16
    Preparing search index...

    Class ComponentBuilder<DataType>Abstract

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

    Type Parameters

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    data: Partial<DataType>

    The API data associated with this component.

    Methods

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

      Returns this

    • Sets the id (not the custom id) for this component.

      Parameters

      • id: number

        The id for this component

      Returns this

    • Serializes this builder to API-compatible JSON data.

      Returns AnyAPIActionRowComponent

      This method runs validations on the data before serializing it. As such, it may throw an error if the data is invalid.