feat(moderation): add a bool value for inline fields
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 53s

This commit is contained in:
Seaswimmer 2023-12-14 17:01:02 -05:00
parent e411e4b942
commit 24f933f6f6
Signed by: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -822,7 +822,7 @@ class Moderation(commands.Cog):
await self.log(interaction, moderation_id)
@app_commands.command(name="history")
async def history(self, interaction: discord.Interaction, target: discord.User = None, moderator: discord.User = None, pagesize: app_commands.Range[int, 1, 25] = 5, page: int = 1, ephemeral: bool = False, export: bool = False):
async def history(self, interaction: discord.Interaction, target: discord.User = None, moderator: discord.User = None, pagesize: app_commands.Range[int, 1, 25] = 5, page: int = 1, ephemeral: bool = False, export: bool = False, inline: bool = False):
"""List previous infractions.
Parameters
@ -932,7 +932,7 @@ class Moderation(commands.Cog):
if bool(case['resolved']):
field_value += "\n**Resolved:** True"
embed.add_field(name=field_name, value=field_value, inline=False)
embed.add_field(name=field_name, value=field_value, inline=inline)
await interaction.followup.send(embed=embed, ephemeral=ephemeral)