Hey there, so I am workig on a Discord Bot with poise, mostly to get some more practice with Rust.
So the 'thing' I am trying to do right now is mostly for learning purposes. In addition I am using a lib I made, to see how "friendly" it is to use.
What I am trying to do
Because this Bot will work with a lot of Data, I wanted a "universal" way of paginating things (in a fancy way)
The attached file has the impl of the so called LazyEmbedPaginator. (It uses a PaginateLazily, which is just a wrapper to keep track of the internal state of the paginator. It takes an Fn, which is responsible for generating said pages - if you want to see it's code, just lmk)
My probblem
The interactions are gathered via a while let, the issue arises at the part with the "Jump to page" button. Discord doesn't send an update whenever a user closes a Modal (only when submitting). This means I have to wait for the timeout, the issue: The timeout is .awaited, which will block the interaction collecting.
Example
If a user wants to jump to a page using this button, presses it and then realizes "oh nvm, it's just the next page", clicks it away, they will have to wait for the timeout until the other buttons start working.
What I've tried so far
I only tried wrapping the "jump to page" part within a task/future (didn't get it to work, probably a skill issue tho).
Can't think of any other solution, since I need to start something, without blocking the function I am currently within.