feat(aurora): changed a lot of stuff. THIS IS A BREAKING CHANGE! VERY BREAKING! TAKE DATABASE BACKUPS BEFORE UPDATING TO THIS
This commit is contained in:
parent
e8ca0aeb1c
commit
afed1d6a37
3 changed files with 33 additions and 18 deletions
|
@ -62,7 +62,12 @@ class ImportAuroraView(ui.View):
|
|||
case["target_type"] = "USER"
|
||||
|
||||
if "role_id" not in case or not case["role_id"]:
|
||||
case["role_id"] = 0
|
||||
case["role_id"] = None
|
||||
else:
|
||||
case["role_id"] = int(case["role_id"])
|
||||
|
||||
case["target_id"] = int(case["target_id"])
|
||||
case["moderator_id"] = int(case["moderator_id"])
|
||||
|
||||
if "changes" not in case or not case["changes"]:
|
||||
case["changes"] = []
|
||||
|
@ -74,11 +79,11 @@ class ImportAuroraView(ui.View):
|
|||
if not metadata.get("imported_from"):
|
||||
metadata.update({"imported_from": "Aurora"})
|
||||
|
||||
if case["duration"] != "NULL":
|
||||
if case["duration"] != "NULL" and case["duration"] is not None:
|
||||
hours, minutes, seconds = map(int, case["duration"].split(":"))
|
||||
duration = timedelta(hours=hours, minutes=minutes, seconds=seconds)
|
||||
else:
|
||||
duration = "NULL"
|
||||
duration = None
|
||||
|
||||
await mysql_log(
|
||||
self.ctx.guild.id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue