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
SourceBin
interaction create
Instantly share your code with the world.
6 Replies
d.js toolkit
d.js toolkit3w ago
- 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 OP
d.js docs
d.js docs3w ago
The order of function parameters must match between definition and function call.
function execute(client, interaction) { ... };
execute(interaction, client);
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
treble/luna
treble/luna3w ago
ah wait
JuanS
JuanS3w ago
I think I got it right...
treble/luna
treble/luna3w ago
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
JuanS
JuanS3w ago
aahhh okk I'll try to solve it it worked thank you very much