feat(moderation): added a changes field to the case embed

This commit is contained in:
SeaswimmerTheFsh 2023-12-15 15:47:29 -05:00
parent 0f16b0eee9
commit c07e3cc095
Signed by untrusted user: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -468,7 +468,9 @@ class Moderation(commands.Cog):
if case_dict['duration'] != 'NULL':
td = timedelta(**{unit: int(val) for unit, val in zip(["hours", "minutes", "seconds"], case_dict["duration"].split(":"))})
duration_embed = f"{humanize.precisedelta(td)} | <t:{case_dict['end_timestamp']}:R>" if bool(case_dict['expired']) is False else str(humanize.precisedelta(td))
embed.description = embed.description + f"\n**Duration:** {duration_embed}\n**Expired:** {bool(case_dict['expired'])}"
embed.description += f"\n**Duration:** {duration_embed}\n**Expired:** {bool(case_dict['expired'])}"
embed.description += f"\n**Changes:** {len(case_dict['changes'])}"
embed.add_field(name='Reason', value=f"```{case_dict['reason']}```", inline=False)