Query about Modals

Quick query, I'm using the short style in modals to collect demographic data and I'm not too sure where it is but.
data.components[BASE_TYPE_BAD_LENGTH]: Must be between 1 and 5 in length.
at handleErrors (C:\Users\kirak\Desktop\ARG\node_modules\@discordjs\rest\dist\index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (C:\Users\kirak\Desktop\ARG\node_modules\@discordjs\rest\dist\index.js:826:23)
at async _REST.request (C:\Users\kirak\Desktop\ARG\node_modules\@discordjs\rest\dist\index.js:1266:22)
at async ButtonInteraction.showModal (C:\Users\kirak\Desktop\ARG\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:253:5)
at async Object.execute (C:\Users\kirak\Desktop\ARG\buttons\submitCaptcha.js:156:4)
at async Client.<anonymous> (C:\Users\kirak\Desktop\ARG\index.js:125:5) {
requestBody: { files: undefined, json: { type: 9, data: [Object] } },
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: { data: [Object] }
},
code: 50035,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1190317516082384917/aW50ZXJhY3Rpb246MTE5MDMxNzUxNjA4MjM4NDkxNzp1WlU1ZEdLaWRCa1hzaFdlTHlEVmR1cHgxQXFqbVVqZ3ltcTJTRDdqQ2E1NjF5MlRjeHJwcmtZbEdDQmpIMDJnY1QxY1hVd1cyZ3pxU0JSQWg5YThQVWRzRllDSDc2QkZwRGZUR1psYXhqZ3hnWjhYdTYwOEU0NFhiYUFoSDRGTw/callback'
}
[29-12-2023_15-36-50] • An error has occurred: DiscordAPIError[50035]: Invalid Form Body
data.components[BASE_TYPE_BAD_LENGTH]: Must be between 1 and 5 in length.
data.components[BASE_TYPE_BAD_LENGTH]: Must be between 1 and 5 in length.
at handleErrors (C:\Users\kirak\Desktop\ARG\node_modules\@discordjs\rest\dist\index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (C:\Users\kirak\Desktop\ARG\node_modules\@discordjs\rest\dist\index.js:826:23)
at async _REST.request (C:\Users\kirak\Desktop\ARG\node_modules\@discordjs\rest\dist\index.js:1266:22)
at async ButtonInteraction.showModal (C:\Users\kirak\Desktop\ARG\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:253:5)
at async Object.execute (C:\Users\kirak\Desktop\ARG\buttons\submitCaptcha.js:156:4)
at async Client.<anonymous> (C:\Users\kirak\Desktop\ARG\index.js:125:5) {
requestBody: { files: undefined, json: { type: 9, data: [Object] } },
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: { data: [Object] }
},
code: 50035,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1190317516082384917/aW50ZXJhY3Rpb246MTE5MDMxNzUxNjA4MjM4NDkxNzp1WlU1ZEdLaWRCa1hzaFdlTHlEVmR1cHgxQXFqbVVqZ3ltcTJTRDdqQ2E1NjF5MlRjeHJwcmtZbEdDQmpIMDJnY1QxY1hVd1cyZ3pxU0JSQWg5YThQVWRzRllDSDc2QkZwRGZUR1psYXhqZ3hnWjhYdTYwOEU0NFhiYUFoSDRGTw/callback'
}
[29-12-2023_15-36-50] • An error has occurred: DiscordAPIError[50035]: Invalid Form Body
data.components[BASE_TYPE_BAD_LENGTH]: Must be between 1 and 5 in length.
I'm getting this error Do short style modals have a set length value? I'll provide my code if needed but to keep the chat clean i'll upload it as a txt document
2 Replies
d.js toolkit
d.js toolkit6mo 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 OP
Kiɾʌ Kenjiɾø
A-h shit it's talking about the ammount of components i have isnt it FuuuUUCCCKKK!?!? Next question any one got any better ideas of wtf i can do kek you even do pagination in discord? Ooh! that's actually a nice idea! Not too unuser-friendly! i was thinking of that or just auto opening another one as the user clicks the lil send button on the modal im just tryna think, i'd be able to send the data off before opening the next modal automaticly (Riighht??) or would the interaction time out Shit it would time out wouldnt dogeHaHa welp guess im locked on the first one! Daamnnn you discorrrddd!! Damn it i was just rying that xD Haha I mean fair play now i think about it It would be cool to have pagination though! longer modals :D Oh god i didnt even think about that! well i mean idk what can be more painful than what they have now with the new update kekw think i'll just send a embed with 2 buttons for both the embeds! as i can fit 5 on one modal i just need 2 modals! simples :] Yeah, i think im just too used to the 'discord look'! having such a big change is something pff! anyway thanks for the help qj, always apricate ya 💜 this way works better as i can get a lil big of description in too with the embed