forked from cswimr/SeaCogs
feat(moderation): case's ephemeral toggle will now be handled by the history_ephemeral config
This commit is contained in:
parent
b01a2bbb21
commit
1bd0a6d23b
1 changed files with 6 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue