fix(moderation): rounded timedelta

This commit is contained in:
Seaswimmer 2023-12-15 22:02:24 -05:00
parent 26225d3774
commit 5e45da84fc
Signed by untrusted user: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -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 = '?'