forked from blizzthewolf/SeaCogs
fix(moderation): fixed broken duration imports
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)
|
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
|
||||||
|
|
Loading…
Reference in a new issue