Hello I have this error:

components[0][UNION_TYPE_CHOICES]: Value of field "type" must be one of (1,).
at handleErrors (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:640:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:1021:23)
at async SequentialHandler.queueRequest (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:862:14)
at async REST.request (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:1387:22)
at async InteractionWebhook.editMessage (C:\Kigo-2\node_modules\discord.js\src\structures\Webhook.js:338:15)
at async StringSelectMenuInteraction.editReply (C:\Kigo-2\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:158:17)
components[0][UNION_TYPE_CHOICES]: Value of field "type" must be one of (1,).
at handleErrors (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:640:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:1021:23)
at async SequentialHandler.queueRequest (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:862:14)
at async REST.request (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:1387:22)
at async InteractionWebhook.editMessage (C:\Kigo-2\node_modules\discord.js\src\structures\Webhook.js:338:15)
at async StringSelectMenuInteraction.editReply (C:\Kigo-2\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:158:17)
this is my code: https://pastebin.com/bBzH0W7N
Pastebin
async function createMenu(namev, limit) { ...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
5 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
duck
duck2y ago
Sounds like you're not putting that select menu in an action row before sending it
Mockir
Mockir2y ago
Bro can u send your code photo or send direct in here? I cant open pastebin
JuanQ
JuanQOP2y ago
I fixed it, that's what the other said, thanks anyway.
Mockir
Mockir2y ago
Okeeyy
Want results from more Discord servers?
Add your server