Cannot read properties of undefined (reading 'getUser')
Hi I need to take the OWNER string of this code and put it on the interactioncreate event, however it gives me error "Cannot read properties of undefined (reading 'getUser')"
here is the
slash command code: https://sourceb.in/SnKerj08zH
interactioncreate
https://sourceb.in/EGRvCVqj0j
6 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 OPThe order of function parameters must match between definition and function call.
- mismatch! you pass an interaction where the client is expected
- mismatch! you pass the client where an interaction is expected
ah wait
I think I got it right...
You're trying to access .options in a modalsubmit
That doesnt have an options field
If you want the user option, store it somewhere or use a collector
aahhh okk I'll try to solve it
it worked thank you very much