data.choices[0][MODEL_TYPE_CONVERT]: Only dictionaries may be used in a ModelType

That is what I am responding with:
interaction.respond({ name: "a", value: "AA" })
interaction.respond({ name: "a", value: "AA" })
What am I doing wrong?
2 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.
Maxi130
Maxi130OP2y ago
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData); ^ DiscordAPIError[50035]: Invalid Form Body data.choices[0][MODEL_TYPE_CONVERT]: Only dictionaries may be used in a ModelType data.choices[1][MODEL_TYPE_CONVERT]: Only dictionaries may be used in a ModelType at SequentialHandler.runRequest (C:\Users\User\Desktop\meine projekte\javascript\Discord\Eval\node_modules@discordjs\rest\dist\index.js:667:15) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async SequentialHandler.queueRequest (C:\Users\User\Desktop\meine projekte\javascript\Discord\Eval\node_modules@discordjs\rest\dist\index.js:464:14) at async REST.request (C:\Users\User\Desktop\meine projekte\javascript\Discord\Eval\node_modules@discordjs\rest\dist\index.js:910:22) at async AutocompleteInteraction.respond (C:\Users\User\Desktop\meine projekte\javascript\Discord\Eval\node_modules\discord.js\src\structures\AutocompleteInteraction.js:86:5) { requestBody: { files: undefined, json: { type: 8, data: { choices: { name: 'Continue', value: 'Typing' } }
} }, rawError: { code: 50035, errors: { data: { choices: { '0': { _errors: [Array] }, '1': { _errors: [Array] } } } }, INTERACTIONTOKEN/callback' } Ah. I oversaw that. Works! Thanks!
Want results from more Discord servers?
Add your server