Always read a modal InputTextValue but when it doesn't exist it makes a null value of it.
Does anyone know how to always read a modal InputTextValue but when it doesn't exist it makes a null value of it?
Here is my code with 2 different ways but they all get error with the following:
7 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!Why are you trying to get a field that isnt even in the modal
For futher proving. I want to make it so that when it exist it can be used en when it doesn't exist is gives a null value.
Thats not how modals work, you should know what fields it has
You could catch the error I suppose, and set null there
How sould I do that with my code?
try {} catch {}
you should always know what fields there are in a modal anyways