feat(moderation): history embeds can now be epheremal
All checks were successful
Pylint / Pylint (push) Successful in 1m16s
All checks were successful
Pylint / Pylint (push) Successful in 1m16s
This commit is contained in:
parent
3c35eeb29d
commit
1e59f0cada
1 changed files with 2 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue