fix(moderation): fixed broken duration imports
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 50s
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 50s
This commit is contained in:
parent
cef337132b
commit
53003efb89
1 changed files with 3 additions and 1 deletions
|
@ -1788,11 +1788,13 @@ class Moderation(commands.Cog):
|
|||
|
||||
timestamp = round(case['timestamp'] / 1000)
|
||||
|
||||
if case['duration']:
|
||||
if case['duration'] is not None:
|
||||
try:
|
||||
duration = timedelta(seconds=round(float(case['duration']) / 1000))
|
||||
except OverflowError:
|
||||
continue
|
||||
else:
|
||||
duration = timedelta(seconds=0)
|
||||
|
||||
if case['resolved']:
|
||||
resolved = 1
|
||||
|
|
Loading…
Reference in a new issue