Verifying if interaction user matches expected target #7525
-
Context: I have an interactive discord game bot, the /start command is used to display a "pre-game" message which is actually just a blank embed board with 2 buttons, namely Play and Tutorial. The rest of the game is handled in the Problem: I'm not sure how I could test if the interaction user matches the same person who ran the initial start command which is handled in its own command file. Keep in mind, this Give Up Button is handled within the Im tired and its like 3 in the morning but I'll rest better after knowing there's a viable solution 😅 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
U can either use a collector with filter. Or for some reason, if u want to listen to |
Beta Was this translation helpful? Give feedback.
U can either use a collector with filter. Or for some reason, if u want to listen to
interactionCreate
then u can add the user id in the button customId. And then check with that customId. Or u can also dointeraction.message.interaction.user
to get the user who executedstart
command if it's a slash command.