fix(moderation): do not count the original moderation as a change when checking a case

This commit is contained in:
Seaswimmer 2023-12-18 15:15:24 -05:00
parent 855c3845ef
commit f4839d9df7
Signed by untrusted user: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -75,7 +75,7 @@ async def embed_factory(embed_type: str, color: Color, /, interaction: Interact
duration_embed = f"{humanize.precisedelta(td)} | <t:{case_dict['end_timestamp']}:R>" if bool(case_dict['expired']) is False else str(humanize.precisedelta(td)) 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 += 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.description += f"\n**Changes:** {len(case_dict['changes']) - 1}" if case_dict['changes'] else "\n**Changes:** 0"
if case_dict['metadata']: if case_dict['metadata']:
if case_dict['metadata']['imported_from']: if case_dict['metadata']['imported_from']: