fix(moderation): fixed broken duration imports

This commit is contained in:
Seaswimmer 2023-12-16 20:20:45 -05:00
parent cef337132b
commit 53003efb89
Signed by untrusted user: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -1788,11 +1788,13 @@ class Moderation(commands.Cog):
timestamp = round(case['timestamp'] / 1000) timestamp = round(case['timestamp'] / 1000)
if case['duration']: if case['duration'] is not None:
try: try:
duration = timedelta(seconds=round(float(case['duration']) / 1000)) duration = timedelta(seconds=round(float(case['duration']) / 1000))
except OverflowError: except OverflowError:
continue continue
else:
duration = timedelta(seconds=0)
if case['resolved']: if case['resolved']:
resolved = 1 resolved = 1