Sapphire Paginated Embed

I have a paginated embed which works fine by the way. I just need a way to be able to select one field from all the embed fields and then run a function based on which field was selected via a string select menu. Can anyone please guide me in the right direction?
Solution:
No that's not currently possible. Right now the components are resolved at build, not per page. However there is a WIP PR that will address this so it may come in the future.
Jump to solution
13 Replies
Marino
MarinoOP•2y ago
Using PaginatedMessageEmbedFields ^
Favna
Favna•2y ago
Discord API doesn't allow "selecting" embed fields
Marino
MarinoOP•2y ago
No I said through a string select menu
Favna
Favna•2y ago
add your own action with addAction and implement its run method. It's pretty straightforward. https://www.sapphirejs.dev/docs/Documentation/api-utilities/interfaces/sapphire_discord_js_utilities.PaginatedMessageActionMenu#run You can get the data through context.interaction.thingy
Marino
MarinoOP•2y ago
Okay thank you 🙂 https://haste.marino.codes/zusajoxitu.typescript Can I get somehow get the page index to only display the values that are shown on the embed itself?
Favna
Favna•2y ago
What page index are you referring to? Do you mean the options of the menu?
Marino
MarinoOP•2y ago
Let me just send a screenshot in here, one moment 😄 So, I have these field entries in the embed itself
Marino
MarinoOP•2y ago
The select menu should serve as a selection menu on which aircraft to buy from the shop
Favna
Favna•2y ago
So yes the options of the menu
Marino
MarinoOP•2y ago
Yes sorry 😅
Solution
Favna
Favna•2y ago
No that's not currently possible. Right now the components are resolved at build, not per page. However there is a WIP PR that will address this so it may come in the future.
Marino
MarinoOP•2y ago
Okay thanks for your help
Want results from more Discord servers?
Add your server