8 Replies
- 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
Getting the Error:
Error executing command setup: Error: Expected the value to be a string or number
[DISCORD ERROR] Error [InteractionAlreadyReplied]: The reply to this interaction has already been sent or deferred.
at ChatInputCommandInteraction.reply (/home/container/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:163:46)
at Object.execute (/home/container/handlers/command.js:29:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'InteractionAlreadyReplied'
}
please dont stringify your errors
it makes them useless
and it looks like your code and error dont match
done
not really
if you stringify the error like you do, it gets rid of the stack
though im pretty sure a TextDisplayBuilder's constructor does not take a string
Error in whitelist setup: DiscordAPIError[50035]: Invalid Form Body
components[0][UNION_TYPE_CHOICES]: Value of field "type" must be one of (1,).
at handleErrors (/home/container/node_modules/@discordjs/rest/dist/index.js:748:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:1149:23)
at async SequentialHandler.queueRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:980:14)
at async _REST.request (/home/container/node_modules/@discordjs/rest/dist/index.js:1293:22)
at async TextChannel.send (/home/container/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:195:15)
at async Object.whitelistSetup [as execute] (/home/container/commands/setup/whitelist.js:63:9)
at async Object.execute (/home/container/commands/setup.js:21:17)
at async Object.execute (/home/container/handlers/command.js:26:13) {
requestBody: {
files: [],
json: {
content: undefined,
tts: false,
nonce: undefined,
enforce_nonce: false,
embeds: undefined,
components: [Array],
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined,
applied_tags: undefined,
poll: undefined
}
},
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: { components: [Object] }
},
code: 50035,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/channels/1372120935607566426/messages'
}
@treble/luna
MessageFlags.IsComponentsV2
thank you got it