Class TextInputBuilder

Hierarchy

  • TextInputBuilder
    • TextInputBuilder

Constructors

Properties

data: Partial<APITextInputComponent>

The API data associated with this component.

Methods

  • Sets the custom id for this text input.

    Parameters

    • customId: string

      The custom id to use

    Returns TextInputBuilder

  • Sets the label for this text input.

    Parameters

    • label: string

      The label to use

    Returns TextInputBuilder

  • Sets the maximum length of text for this text input.

    Parameters

    • maxLength: number

      The maximum length of text for this text input

    Returns TextInputBuilder

  • Sets the minimum length of text for this text input.

    Parameters

    • minLength: number

      The minimum length of text for this text input

    Returns TextInputBuilder

  • Sets the placeholder for this text input.

    Parameters

    • placeholder: string

      The placeholder to use

    Returns TextInputBuilder

  • Sets whether this text input is required.

    Parameters

    • Optional required: boolean

      Whether this text input is required

    Returns TextInputBuilder

  • Sets the style for this text input.

    Parameters

    Returns TextInputBuilder

  • Sets the value for this text input.

    Parameters

    • value: string

      The value to use

    Returns TextInputBuilder

  • Serializes this builder to API-compatible JSON data.

    Returns APITextInputComponent

    Remarks

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

Generated using TypeDoc