How to retrieve original command interaction options from select menu interaction?

Hi people, I am trying to figure out if it's possible to retrieve CommandInteraction options from a StringSelectMenuInteraction. This is mainly because within my bot project I have created several handlers to keep files and code organised, so therefore, I have Button Interactions, Modal Interactions, Command Interactions and Select Menu interaction stored in different files. For example I have a slash command in one file and the code for it in said file, but then I have a interaction manager which will find the select menu with the interaction custom id and execute the code within that file. As a result of this I am unable to keep select menu interaction and command interactions within the same file, so that's why I was wondering if it is possible to retrieve original command interaction option values from a secondary interaction such as a button or select. Node Version: v18.17.0 Discord.JS Version: v14.14.0 Many Thanks, Noxxe!
3 Replies
d.js toolkit
d.js toolkit11mo 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
duck
duck11mo ago
no, there is no means of accessing an interaction's data through a different interaction handling them both in the same context (presumably with a collector) or storing the data by some other means (as part of the component's custom id or externally like with a database) would be the ways to go
Noxxe
NoxxeOP11mo ago
Okie dokie dude no worries!
Want results from more Discord servers?
Add your server