Fix http errors for interaction deferring and message changes (#6229)

This commit is contained in:
Jakub Kuczys
2023-08-11 02:51:36 +02:00
committed by GitHub
parent dbb91dfce8
commit 100de11ce6
2 changed files with 20 additions and 11 deletions

View File

@@ -37,6 +37,7 @@ class _GenericButton(discord.ui.Button):
self.func = func
async def callback(self, interaction: discord.Interaction):
await interaction.response.defer()
ctx = self.view.ctx
pages = self.view.source.entries
controls = None
@@ -52,7 +53,6 @@ class _GenericButton(discord.ui.Button):
await self.func(ctx, pages, controls, message, page, timeout, emoji)
except Exception:
pass
await interaction.response.defer()
async def menu(