Creates a new modal from API data.
Optional
data: Partial<APIModalInteractionResponseCallbackData>The API data to create this modal with
Readonly
componentsThe components within this modal.
Readonly
dataThe API data associated with this modal.
Adds action rows to this modal.
The components to add
Use ModalBuilder.addLabelComponents instead
Adds components to this modal.
The components to add
Use ModalBuilder.addLabelComponents or ModalBuilder.addTextDisplayComponents instead
Adds label components to this modal.
The components to add
Adds text display components to this modal.
The components to add
Sets components for this modal.
The components to set
Use ModalBuilder.setLabelComponents instead
Sets the custom id of this modal.
The custom id to use
Sets the labels for this modal.
The components to set
Sets the title of this modal.
The title to use
Removes, replaces, or inserts labels for this modal.
The index to start at
The number of labels to remove
The replacing label objects
This method behaves similarly to Array.prototype.splice(). The maximum amount of labels that can be added is 5.
It's useful for modifying and adjusting order of the already-existing labels of a modal.
Serializes this builder to API-compatible JSON data.
A builder that creates API-compatible JSON data for modals.