Preview environment
export declare class ModalBuilder implements JSONEncodable<APIModalInteractionResponseCallbackData>

A builder that creates API-compatible JSON data for modals.

Constructors

Creates a new modal from API data.

The components within this modal.

The API data associated with this modal.

Adds components to this modal.

setComponents() : this

Sets components for this modal.

setCustomId(
customId: string
) : this

Sets the custom id of this modal.

setTitle(
title: string
) : this

Sets the title of this modal.

Serializes this builder to API-compatible JSON data.