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:Jump to 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.
13 Replies
Using PaginatedMessageEmbedFields ^
Discord API doesn't allow "selecting" embed fields
No I said through a string select menu
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
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?
What page index are you referring to?
Do you mean the options of the menu?
Let me just send a screenshot in here, one moment 😄
So, I have these field entries in the embed itself
The select menu should serve as a selection menu on which aircraft to buy from the shop
So yes the options of the menu
Yes sorry 😅
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.
Okay thanks for your help