Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] V3/develop from Cog-Creators:V3/develop #115

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions redbot/core/utils/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ def __init__(self, style: discord.ButtonStyle, emoji: Union[str, discord.Partial
async def callback(self, interaction: discord.Interaction):
self.view.stop()
if interaction.message.flags.ephemeral:
await interaction.response.edit_message(view=None)
return
await interaction.message.delete()
await interaction.response.defer(thinking=False)
await interaction.delete_original_response()
else:
await interaction.message.delete()


class SimpleMenu(discord.ui.View):
Expand Down Expand Up @@ -208,7 +209,7 @@ def author(self, value: Optional[discord.abc.User]) -> None:

async def on_timeout(self):
try:
if self.delete_after_timeout and not self.message.flags.ephemeral:
if self.delete_after_timeout:
await self.message.delete()
elif self.disable_after_timeout:
for child in self.children:
Expand Down
Loading