Creates a new modal component
The name of the modal
The data of the modal (builder or raw)
module.exports.default = new Modal('number_input', {
customId: 'number_input',
title: 'Number Input',
components: [
{
type: ComponentType.ActionRow,
components: [
{
customId: 'number',
type: ComponentType.TextInput,
style: TextInputStyle.Short,
placeholder: 'Enter a number',
label: 'Number',
required: true
}
]
}
]
});
module.exports.default = new Modal(
'number_input',
new ModalBuilder()
.setCustomId('number_input')
.setTitle('Number Input')
.setComponents(
new ActionRowBuilder()
.setComponents(
new TextInputBuilder()
.setCustomId('number')
.setStyle(TextInputStyle.Short)
.setPlaceholder('Enter a number')
.setLabel('Number')
.setRequired(true)
)
)
);
The data of the modal (builder or raw)
The name of the modal
Generated using TypeDoc
Represents a modal component