From 1e59f0cada55e3570e39c3ad1a88e009f1245bcb Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Fri, 6 Oct 2023 22:55:41 -0400 Subject: [PATCH] feat(moderation): history embeds can now be epheremal --- moderation/moderation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moderation/moderation.py b/moderation/moderation.py index 03a5b04..3cdbe2d 100644 --- a/moderation/moderation.py +++ b/moderation/moderation.py @@ -449,7 +449,7 @@ class Moderation(commands.Cog): await self.mysql_log(interaction.guild.id, interaction.user.id, 'UNBAN', target.id, 'NULL', reason) @app_commands.command(name="history") - async def history(self, interaction: discord.Interaction, target: discord.Member = None, moderator: discord.Member = None, pagesize: app_commands.Range[int, 1, 25] = 5, page: int = 1): + async def history(self, interaction: discord.Interaction, target: discord.Member = None, moderator: discord.Member = None, pagesize: app_commands.Range[int, 1, 25] = 5, page: int = 1, epheremal: bool = False): """List previous infractions.""" database = await self.connect() cursor = database.cursor() @@ -496,7 +496,7 @@ class Moderation(commands.Cog): if bool(case['resolved']): field_value = field_value + "\n**Resolved:** True" embed.add_field(name=field_name, value=field_value, inline=False) - await interaction.response.send_message(embed=embed) + await interaction.response.send_message(embed=embed, ephemeral=epheremal) @app_commands.command(name="resolve") async def resolve(self, interaction: discord.Interaction, case_number: int, reason: str = None):