ModalBuilder
declare class ModalBuilder implements JSONEncodable<APIModalInteractionResponseCallbackData> declare class ModalBuilder implements JSONEncodable<APIModalInteractionResponseCallbackData> No summary provided.
Implements
JSONEncodable<APIModalInteractionResponseCallbackData>constructor({ components, ...data }?)
Constructs a new instance of the
ModalBuilder class| Name | Type | Optional | Description |
|---|---|---|---|
| { components, ...data } | Partial<APIModalInteractionResponseCallbackData> | Yes | None |
Readonly
Readonly
data
:
Partial<APIModalInteractionResponseCallbackData>
addComponents(components)
:
this
Adds components to this modal
| Name | Type | Optional | Description |
|---|---|---|---|
| components | RestOrArray<ActionRowBuilder<ModalActionRowComponentBuilder> | APIActionRowComponent<APIModalActionRowComponent>> | No | The components to add to this modal |
setComponents(components)
:
this
Sets the components in this modal
| Name | Type | Optional | Description |
|---|---|---|---|
| components | RestOrArray<ActionRowBuilder<ModalActionRowComponentBuilder>> | No | The components to set this modal to |
setCustomId(customId)
:
this
Sets the custom id of the modal
| Name | Type | Optional | Description |
|---|---|---|---|
| customId | string | No | The custom id of this modal |
setTitle(title)
:
this
Sets the title of the modal
| Name | Type | Optional | Description |
|---|---|---|---|
| title | string | No | The title of the modal |
toJSON()
:
APIModalInteractionResponseCallbackData
Serializes this component to an API-compatible JSON object