Search...

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
NameTypeOptionalDescription
{ components, ...data }Partial<APIModalInteractionResponseCallbackData>YesNone
Readonly

components

:

ActionRowBuilder<ModalActionRowComponentBuilder>[]

Readonly

data

:

Partial<APIModalInteractionResponseCallbackData>

addComponents(components)

:

this

Adds components to this modal
NameTypeOptionalDescription
componentsRestOrArray<ActionRowBuilder<ModalActionRowComponentBuilder> | APIActionRowComponent<APIModalActionRowComponent>>NoThe components to add to this modal

setComponents(components)

:

this

Sets the components in this modal
NameTypeOptionalDescription
componentsRestOrArray<ActionRowBuilder<ModalActionRowComponentBuilder>>NoThe components to set this modal to

setCustomId(customId)

:

this

Sets the custom id of the modal
NameTypeOptionalDescription
customIdstringNoThe custom id of this modal

setTitle(title)

:

this

Sets the title of the modal
NameTypeOptionalDescription
titlestringNoThe title of the modal

toJSON()

:

APIModalInteractionResponseCallbackData