From 5e45da84fc14902716294eb14a534a2a41ca7c2e Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Fri, 15 Dec 2023 22:02:24 -0500 Subject: [PATCH] fix(moderation): rounded timedelta --- moderation/moderation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/moderation/moderation.py b/moderation/moderation.py index eea287e..dd333d2 100644 --- a/moderation/moderation.py +++ b/moderation/moderation.py @@ -1716,10 +1716,10 @@ class Moderation(commands.Cog): if case['type'] not in accepted_types: continue - timestamp = case['timestamp'] / 1000 + timestamp = round(case['timestamp'] / 1000) if case['duration']: - duration = timedelta(milliseconds=case['duration']) + duration = timedelta(seconds=round(case['duration'] / 1000)) if case['resolved']: resolved = 1 @@ -1731,7 +1731,7 @@ class Moderation(commands.Cog): if change['type'] == 'RESOLVE': resolved_by = change['staff'] resolved_reason = change['reason'] - resolved_timestamp = change['timestamp'] / 1000 + resolved_timestamp = round(change['timestamp'] / 1000) break if resolved_by is None: resolved_by = '?'