fix(moderation): rounded timedelta
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 45s

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

View file

@ -1716,10 +1716,10 @@ class Moderation(commands.Cog):
if case['type'] not in accepted_types: if case['type'] not in accepted_types:
continue continue
timestamp = case['timestamp'] / 1000 timestamp = round(case['timestamp'] / 1000)
if case['duration']: if case['duration']:
duration = timedelta(milliseconds=case['duration']) duration = timedelta(seconds=round(case['duration'] / 1000))
if case['resolved']: if case['resolved']:
resolved = 1 resolved = 1
@ -1731,7 +1731,7 @@ class Moderation(commands.Cog):
if change['type'] == 'RESOLVE': if change['type'] == 'RESOLVE':
resolved_by = change['staff'] resolved_by = change['staff']
resolved_reason = change['reason'] resolved_reason = change['reason']
resolved_timestamp = change['timestamp'] / 1000 resolved_timestamp = round(change['timestamp'] / 1000)
break break
if resolved_by is None: if resolved_by is None:
resolved_by = '?' resolved_by = '?'