WIP: Moderation type registry #26
1 changed files with 1 additions and 2 deletions
|
@ -1,6 +1,5 @@
|
||||||
# pylint: disable=cyclic-import
|
# pylint: disable=cyclic-import
|
||||||
import json
|
import json
|
||||||
from ast import literal_eval
|
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from typing import Optional, Union
|
from typing import Optional, Union
|
||||||
|
|
||||||
|
@ -135,7 +134,7 @@ def generate_dict(bot: Red, result: dict, guild_id: int) -> dict:
|
||||||
duration = None
|
duration = None
|
||||||
|
|
||||||
if result[14] is not None:
|
if result[14] is not None:
|
||||||
changes = literal_eval(json.loads(result[14]))
|
changes = json.loads(result[14])
|
||||||
change_obj_list = []
|
change_obj_list = []
|
||||||
for change in changes:
|
for change in changes:
|
||||||
change_obj_list.append(Change.from_dict(bot=bot, data=change))
|
change_obj_list.append(Change.from_dict(bot=bot, data=change))
|
||||||
|
|
Loading…
Reference in a new issue