fix(moderation): silently fail if an overflow error is encountered

This commit is contained in:
Seaswimmer 2023-12-15 22:13:38 -05:00
parent 8da6288263
commit c8a32058f1
Signed by untrusted user: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -1719,7 +1719,10 @@ class Moderation(commands.Cog):
timestamp = round(case['timestamp'] / 1000) timestamp = round(case['timestamp'] / 1000)
if case['duration']: if case['duration']:
duration = timedelta(seconds=round(float(case['duration']) / 1000)) try:
duration = timedelta(seconds=round(float(case['duration']) / 1000))
except OverflowError:
continue
if case['resolved']: if case['resolved']:
resolved = 1 resolved = 1