Discord-Modals Error

Error - data.components[0].components[BASE_TYPE_BAD_LENGTH]: Must be between 1 and 5 in length.
case 'permit':
const permitModal = new ModalBuilder()
.setCustomId('permitModal')
.setTitle('Permit User or Role')
.addComponents(
new TextInputBuilder()
.setCustomId('permitInput')
.setLabel('User or Role Name')
.setStyle(TextInputStyle.Short)
.setMinLength(1)
.setMaxLength(5)

);
await interaction.showModal(permitModal);
break;

case 'restrict':
const restrictModal = new ModalBuilder()
.setCustomId('restrictModal')
.setTitle('Restrict User or Role')
.addComponents(
new TextInputBuilder()
.setCustomId('restrictInput')
.setLabel('User or Role Name')
.setStyle(TextInputStyle.Short)
.setMinLength(1)

.setMaxLength(5)

);
await interaction.showModal(restrictModal);
break;
Was this page helpful?