ModalBuilder
ModalBuilder is used to construct a modal dialog for a Discord interaction, including title and components.
Usage:
Properties
The ModalBuilder instance has no set properties!
Methods
setTitle
ModalBuilder : setTitle () -> Builders.ModalBuilder
title: string
Sets the title of the modal.
addComponent
ModalBuilder : addComponent () -> Builders.ModalBuilder
componentObject: DiscordComponentTypes.DiscordComponent
Adds a component to the modal. The modal can contain up to five components.
toPayloadObject
ModalBuilder : toPayloadObject () -> Network.Resolvable
Converts the modal to a JSON object that can be sent to the Discord API.
Functions
new
ModalBuilder . new () -> ()
modalId: string
Creates a new instance of ModalBuilder.