diff options
-rw-r--r-- | bot/cogs/moderation/management.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bot/cogs/moderation/management.py b/bot/cogs/moderation/management.py index 5c63b19ce..5221baa81 100644 --- a/bot/cogs/moderation/management.py +++ b/bot/cogs/moderation/management.py @@ -97,9 +97,8 @@ class ModManagement(commands.Cog): confirm_messages.append("marked as permanent") elif duration is not None: request_data['expires_at'] = duration.isoformat() - expiry = duration.strftime(time.INFRACTION_FORMAT) - duration_string = time.get_duration(duration, datetime.utcnow()) - confirm_messages.append(f"set to expire on {expiry} ({duration_string})") + expiry = time.get_duration_from_expiry(request_data['expires_at']) + confirm_messages.append(f"set to expire on {expiry}") else: confirm_messages.append("expiry unchanged") @@ -236,8 +235,8 @@ class ModManagement(commands.Cog): if infraction["expires_at"] is None: expires = "*Permanent*" else: - duration = time.get_duration_from_expiry(infraction["expires_at"]) - expires = f"{time.format_infraction(infraction['expires_at'])} ({duration})" + date_from = datetime.strptime(created, time.INFRACTION_FORMAT) + expires = time.get_duration_from_expiry(infraction["expires_at"], date_from) lines = textwrap.dedent(f""" {"**===============**" if active else "==============="} |