Add delete button

This commit is contained in:
Nexus 2023-04-28 15:26:09 +01:00
parent f7a832ac12
commit 6db495139b
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -1078,6 +1078,16 @@ class OtherCog(commands.Cog):
else:
return await interaction.edit_original_response(content=new_result)
@discord.ui.button(
label="Delete",
style=discord.ButtonStyle.red,
emoji="\N{wastebasket}\U0000fe0f"
)
async def delete(self, _, interaction: discord.Interaction):
await interaction.response.defer()
await interaction.delete_original_response()
self.stop()
await ctx.defer()
result = await get_quote()
if isinstance(result, discord.File):