fix(aurora): import fixes

This commit is contained in:
Seaswimmer 2024-05-09 21:27:26 -04:00
parent 904fd1c914
commit dc51aa7bdc
Signed by untrusted user: cswimr
GPG key ID: 5D671B5D03D65A7F
3 changed files with 10 additions and 7 deletions

View file

@ -4,9 +4,9 @@ from typing import Literal, Optional
from redbot.core.bot import Red
from ..models.base import AuroraBaseModel
from ..models.partials import PartialUser
from ..utilities.logger import logger
from .base import AuroraBaseModel
from .partials import PartialUser
class Change(AuroraBaseModel):

View file

@ -8,11 +8,11 @@ import discord
from discord import NotFound
from redbot.core.bot import Red
from ..models.base import AuroraGuildModel
from ..models.change import Change
from ..models.partials import PartialChannel, PartialRole, PartialUser
from ..utilities.logger import logger
from ..utilities.utils import get_next_case_number
from .base import AuroraGuildModel
from .change import Change
from .partials import PartialChannel, PartialRole, PartialUser
class Moderation(AuroraGuildModel):
@ -241,7 +241,10 @@ class Moderation(AuroraGuildModel):
elif not isinstance(timestamp, datetime):
timestamp = datetime.fromtimestamp(timestamp)
if duration != "NULL" and duration is not None:
if duration == "NULL":
duration = None
if duration is not None:
end_timestamp = timestamp + duration
else:
duration = None

View file

@ -1,7 +1,7 @@
from discord import Forbidden, HTTPException, InvalidData, NotFound
from redbot.core.bot import Red
from ..models.base import AuroraBaseModel, AuroraGuildModel
from .base import AuroraBaseModel, AuroraGuildModel
class PartialUser(AuroraBaseModel):