TypeError: Cannot read properties of undefined (reading 'user')
Hi. Can someone tell me what's the problem here? :D
14 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
dc.js 14.7.1
node 16.18.0
I'm not sure what interaction.target.username is
But I think that error is telling you that target doesn't exist, which it doesn't tmk
I think you are looking for
interaction.user.username
im trying to bring into title username of user that i've mentioned in
.addUserOption
I think you should be using just
target.username
then
As you are defining the interaction user target as targetdoesnt work too. Tried to do it with discordjs.guide and everytime same error with that Username
tried
interaction.target.username
target.username
target.user.username
and some others
nothing works :/You have no target option in your command it seems 🤔
The option appears to be some name in a different language
You'll want to specify that name for the option instead of
.getUser('target')
so i need to change that "Użytkownik" into target?
Yeah
or the other way around, depending on what you want the option to be called
Worked. Thanks a lot <3 You're the best :D
Awesome, happy to help :)