#Dynamic SelectMenu with Pagination

1 messages · Page 1 of 1 (latest)

lean spade
#

I'm using Fergun library to handle the pagination, with the paginator I've setup a select menu attached to it. Lets say that it has 3 options, I've also setup a ComponentInteraction to listen out for the selection. Is it possible to modify the SelectMenu on this paginatior once component interaction occurs? For example if user presses option 1, it's removed from selected menu so only option 2 and 3 are remaining and still be able to go through pages with the newly updated select menu? I've tried using Context.Interaction.ModifyOriginalResponseAsync to update component but when pressing any of paginator buttons it returns the selectmenu back to it's original state with 3 options

kind dirge
#

Use the overload of AddSelectMenu() that takes a select menu factory as argument, this way you can have dynamic select menus

lean spade
#

cheers although I didn't know about this feature I don't think its what I'm looking for. In particular for my use case I want it to be dynamic based on the users selection rather than the page.

e.g. Select Menu has [1, 2, 3, 4, 5] with 3 Page paginatior.
User is able to flip between the pages.
User selects 3
Identify that user has chosen 3 then remove 3 from current options so select menu should have only [1, 2, 4, 5]
User can still flip between the pages like normal with the new menu options