From 1bd0a6d23b6529280a97881c0394c6cefecd7ce7 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Fri, 15 Dec 2023 10:02:54 -0500 Subject: [PATCH] feat(moderation): case's ephemeral toggle will now be handled by the history_ephemeral config --- moderation/moderation.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/moderation/moderation.py b/moderation/moderation.py index 97066ea..43c91a9 100644 --- a/moderation/moderation.py +++ b/moderation/moderation.py @@ -1139,7 +1139,7 @@ class Moderation(commands.Cog): Choice(name="Export as File", value='file'), Choice(name='Export as Codeblock', value='codeblock') ]) - async def case(self, interaction: discord.Interaction, case: int, ephemeral: bool = False, changes: bool = False, export: Choice[str] = None): + async def case(self, interaction: discord.Interaction, case: int, ephemeral: bool = None, changes: bool = False, export: Choice[str] = None): """Check the details of a specific case. Parameters @@ -1157,6 +1157,11 @@ class Moderation(commands.Cog): await interaction.response.send_message(f"I do not have the `{permissions}` permission, required for this action.", ephemeral=True) return + if ephemeral is None: + ephemeral = (await self.config.user(interaction.user).history_ephemeral() + or await self.config.guild(interaction.guild).history_ephemeral() + or False) + if case != 0: case_dict = await self.fetch_case(case, interaction.guild.id) if case_dict: