diff options
author | 2022-07-28 18:57:01 -0400 | |
---|---|---|
committer | 2022-08-16 16:38:26 -0400 | |
commit | f8e3656a74cfc0cae37cab65ed114319762f01e3 (patch) | |
tree | 9873a1ac757d2348430392df6bb0cf309163da0f | |
parent | Correct last_applied formatting (diff) |
Use `last_applied` to display duration
-rw-r--r-- | bot/exts/moderation/infraction/_utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/exts/moderation/infraction/_utils.py b/bot/exts/moderation/infraction/_utils.py index cd82f5b2e..23ae517e9 100644 --- a/bot/exts/moderation/infraction/_utils.py +++ b/bot/exts/moderation/infraction/_utils.py @@ -188,9 +188,10 @@ async def notify_infraction( expires_at = "Never" duration = "Permanent" else: + origin = arrow.get(infraction["last_applied"]) expiry = arrow.get(infraction["expires_at"]) expires_at = time.format_relative(expiry) - duration = time.humanize_delta(infraction["inserted_at"], expiry, max_units=2) + duration = time.humanize_delta(origin, expiry, max_units=2) if infraction["active"]: remaining = time.humanize_delta(expiry, arrow.utcnow(), max_units=2) |