Closed InspiredImpact closed 3 years ago
_cleanup_reactions
is called on every iteration of the menu loop to remove old reactions when the page changes, so what is happening is that the menu will go on to its next iteration and tries accessing the output
, which it expects to be there. Timeouts are handled by an internal method in BaseMenu
called _execute_timeout
, so you can override that if you're looking to change functionality from the default behavior.
That said, the default timeout behavior should 'just work' on anything that inherits from a *Menu class. Is there something specific you are trying to accomplish which isn't working?
I just set a timeout and it ignores it, so I put it here for 10 seconds and it should have deleted it, but it doesn’t delete it for as long as a minute (despite the fact that I was completely inactive)
menu = MenuPages(self.ctx).set_timeout(10)
menu.persist_on_close()
menu.add_pages([page1, page2, page3, page4])
await menu.open()
where MenuPages is
class MenuPages(ButtonMenu):
pass
In paginatedmenu timeout works, but in buttonmenu - no. if I recreate the function where bot.wait_for and write a timeout there directly, then it will work, but along with this, a bunch of bugs appear.
I'm assuming you are, but can you just confirm you're using the latest version 1.3.1?
Previous versions did have a bug with button menu timeouts.
ohhh yes thank you so much..
Just i tried
and like this
and just nothing happens, but in the second option, the message is deleted when you click on any reaction and an error pops up that "message was not found"