aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ionite34 <[email protected]>2022-07-28 18:57:01 -0400
committerGravatar ionite34 <[email protected]>2022-07-28 18:57:01 -0400
commita98c82c1ec6b244868356b1b2db1daa52e0f2555 (patch)
tree0dc057b2f4305a67f5653837ae7e0fb08a7e7287
parentCorrect last_applied formatting (diff)
Use `last_applied` to display duration
-rw-r--r--bot/exts/moderation/infraction/_utils.py3
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)