problems of bot choosing the person on whome the context command was run

so i have this code for a contextMenuCommand:- https://pastebin.com/KeEWUdAm and this is the file for the button(1st button) which gets triggered when i press that add 10 points button https://pastebin.com/B95zqze9 but the problem comes in, when i press my first button, this code it should show the name of the person on whome the context menu command was executed, but it only shows my name and my avatar it should show the name and the avatar of the person on whome the command was executed but it just takes me
Pastebin
contextCmd.js - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
buttonFile.js - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
No description
No description
2 Replies
d.js toolkit
d.js toolkit9mo 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!
duck
duck9mo ago
that'd be because <Interaction>.user will always refer to the user who created the interaction (e.g. the user who clicked the button) you'd need to store the <UserContextMenuCommandInteraction>.targetId somewhere, be it in the custom id of your buttons or somewhere external then reference this upon receiving a subsequent button interaction