fix(moderation): fixed durations in evidenceformat
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 47s

This commit is contained in:
Seaswimmer 2023-12-18 18:50:18 -05:00
parent 87312549b4
commit 5177cdec84
Signed by: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -138,7 +138,9 @@ async def embed_factory(embed_type: str, color: Color, /, interaction: Interact
content = f"{codeblock}prolog\nCase: {case_dict['moderation_id']:,} ({str.title(case_dict['moderation_type'])})\nTarget: {target_name} ({target_user['id']})\nModerator: {moderator_name} ({moderator_user['id']})" content = f"{codeblock}prolog\nCase: {case_dict['moderation_id']:,} ({str.title(case_dict['moderation_type'])})\nTarget: {target_name} ({target_user['id']})\nModerator: {moderator_name} ({moderator_user['id']})"
if case_dict['duration'] != 'NULL': if case_dict['duration'] != 'NULL':
content += f"Duration: {humanize.precisedelta(case_dict['duration'])}" hours, minutes, seconds = map(int, case_dict['duration'].split(':'))
td = timedelta(hours=hours, minutes=minutes, seconds=seconds)
content += f"\nDuration: {humanize.precisedelta(td)}"
content += f"\nReason: {case_dict['reason']}{codeblock}" content += f"\nReason: {case_dict['reason']}{codeblock}"