if (!field) throw new DiscordjsTypeError(ErrorCodes.ModalSubmitInteractionFieldNotFound, customI
I have this error and this my code in the pictures
12 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 OPnode: v18.17.1
your field custom id is
YourName
, but you're trying to get it via getField('Name')
Ohh, let me check
Oh, Now my code printed what submitted in Modal, but the I have "Something went wrong when submit"
@Squid
You need to reply to the ModalSubmitInteraction
How, wdym?
You mean interaction.reply?
This error gone and solved, but I get something went wrong in discord
Yes, if
interaction
is the interaction you received from the modal, not the interaction from the command being ranAhh, Okay, I want to push data to a discussion form instead of reply, Can I?
I think I can or? @Squid
You need to reply to the modal interaction either way, but you can send a message to a different channel after that
Ok, some bots send messages no one can see it expect the clicker/sender of the Modal
it can be, yes?
Yes, include
ephemeral: true
in your reply options objectAhh, Thank you so much my friend β€οΈ
I will try if done I will mark it as solved
πΉ