#Cannot read properties of undefined (reading 'getUser')

9 messages · Page 1 of 1 (latest)

young kestrel
spring schoonerBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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
tropic pulsarBOT
#

The order of function parameters must match between definition and function call.

function execute(client, interaction) { ... };
execute(interaction, client);
  • mismatch! you pass an interaction where the client is expected
  • mismatch! you pass the client where an interaction is expected
echo gulch
#

ah wait

young kestrel
echo gulch
#

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

young kestrel
#

aahhh okk I'll try to solve it