WIP: Refactor Aurora (3.0.0) #29
1 changed files with 0 additions and 3 deletions
|
@ -4,7 +4,6 @@ from typing import Literal, Optional
|
||||||
|
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
|
|
||||||
from ..utilities.logger import logger
|
|
||||||
from ..utilities.utils import timedelta_from_string
|
from ..utilities.utils import timedelta_from_string
|
||||||
from .base import AuroraBaseModel
|
from .base import AuroraBaseModel
|
||||||
from .partials import PartialUser
|
from .partials import PartialUser
|
||||||
|
@ -38,8 +37,6 @@ class Change(AuroraBaseModel):
|
||||||
def from_dict(cls, bot: Red, data: dict) -> "Change":
|
def from_dict(cls, bot: Red, data: dict) -> "Change":
|
||||||
if isinstance(data, str):
|
if isinstance(data, str):
|
||||||
data = json.loads(data)
|
data = json.loads(data)
|
||||||
if data.get('duration'):
|
|
||||||
logger.debug(f"Duration: {data['duration']}")
|
|
||||||
if data.get('duration') and not isinstance(data["duration"], timedelta) and not data["duration"] == "NULL":
|
if data.get('duration') and not isinstance(data["duration"], timedelta) and not data["duration"] == "NULL":
|
||||||
duration = timedelta_from_string(data["duration"])
|
duration = timedelta_from_string(data["duration"])
|
||||||
elif data.get('duration') and isinstance(data["duration"], timedelta):
|
elif data.get('duration') and isinstance(data["duration"], timedelta):
|
||||||
|
|
Loading…
Reference in a new issue