From 854a1f14e5205bdff42e86ebb96ad28cc6a4e16f Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Wed, 4 Oct 2023 12:24:13 -0400 Subject: [PATCH] fix(moderation): swapped a subtraction action --- moderation/moderation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moderation/moderation.py b/moderation/moderation.py index 661dca8..f19f3c2 100644 --- a/moderation/moderation.py +++ b/moderation/moderation.py @@ -76,7 +76,7 @@ class Moderation(commands.Cog): elif entry.action == discord.AuditLogAction.member_update: if entry.after.timed_out_until is not None: timed_out_until_aware = entry.after.timed_out_until.replace(tzinfo=timezone.utc) - duration_datetime = datetime.now(tz=timezone.utc) + timed_out_until_aware + duration_datetime = timed_out_until_aware - datetime.now(tz=timezone.utc) minutes = round(duration_datetime.total_seconds() / 60) duration = timedelta(minutes=minutes) moderation_type = 'TIMEOUT'