Someone know is there a way to delete the paginator after timeout
I know there is a way to delete after time with
ctx.respond("Text", delete_after=30)
But this will delete it also when i interact with the paginator buttons
So what i need is that it will delete after the on_timeout
on the button it was easy to implement but i didn't know how to do it in the paginator
async def on_timeout(self):
self.disable_all_items()
if isinstance(self.message, discord.Interaction):
await self.message.edit_original_response(view=self)
else:
await self.message.delete()
This is an example how i do it on the select view that works
my script is
async def leaderboard(self, ctx, guild):
async def on_timeout(self):
self.disable_all_items()
if isinstance(self.message, discord.Interaction):
self.message.delete()
else:
self.message.delete()
------- -variable etc. ---------
paginator = Paginator(pages=pages, timeout=30)