fix(moderation): naturaldelta --> precisedelta
Some checks failed
Pylint / Pylint (push) Failing after 1m11s

This commit is contained in:
Seaswimmer 2023-10-05 13:07:51 -04:00
parent df4dc53ecc
commit df49498da7
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -388,7 +388,7 @@ class Moderation(commands.Cog):
embed.description = f"**Type:** {str.title(case['moderation_type'])}\n**Target:** {target_name} ({target.id})\n**Moderator:** {moderator_name} ({moderator.id})\n**Resolved:** {bool(case['resolved'])}\n**Timestamp:** <t:{case['timestamp']}> | <t:{case['timestamp']}:R>" embed.description = f"**Type:** {str.title(case['moderation_type'])}\n**Target:** {target_name} ({target.id})\n**Moderator:** {moderator_name} ({moderator.id})\n**Resolved:** {bool(case['resolved'])}\n**Timestamp:** <t:{case['timestamp']}> | <t:{case['timestamp']}:R>"
if case['duration'] != 'NULL': if case['duration'] != 'NULL':
expired = True if case["end_timestamp"] <= time.time() else False expired = True if case["end_timestamp"] <= time.time() else False
embed.description = embed.description + f"\n**Duration:** {humanize.naturaldelta(case['duration'])}\n**Expired:** {expired}" embed.description = embed.description + f"\n**Duration:** {humanize.precisedelta(case['duration'])}\n**Expired:** {expired}"
embed.add_field(name='Reason', value=f"```{case['reason']}```") embed.add_field(name='Reason', value=f"```{case['reason']}```")
if case['resolved'] == 1: if case['resolved'] == 1:
embed.add_field(name='Resolve Reason', value=f"```{case['resolve_reason']}```") embed.add_field(name='Resolve Reason', value=f"```{case['resolve_reason']}```")