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;
4 Replies
d.js toolkit
d.js toolkit4mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
Pragati
PragatiOP4mo ago
discord.js v14.15.3, node version - 20
chewie
chewie4mo ago
you have to put the textinputbuilder inside an action row
Pragati
PragatiOP4mo ago
oh yea i am dumb thanks
Want results from more Discord servers?
Add your server