WIP: Refactor Aurora (3.0.0) #29

Draft
cswimr wants to merge 347 commits from aurora-pydantic into main
2 changed files with 5 additions and 2 deletions
Showing only changes of commit b252343dc0 - Show all commits

View file

@ -114,6 +114,7 @@ class ImportAuroraView(ui.View):
changes=changes, changes=changes,
metadata=metadata, metadata=metadata,
database=database, database=database,
return_obj=False
) )
await interaction.edit_original_response(content="Import complete.") await interaction.edit_original_response(content="Import complete.")

View file

@ -298,7 +298,8 @@ class Moderation(AuroraGuildModel):
expired: bool | None = None, expired: bool | None = None,
changes: list | None = None, changes: list | None = None,
metadata: dict | None = None, metadata: dict | None = None,
) -> "Moderation": return_obj: bool = True,
) -> "Moderation" | None:
from ..utilities.database import connect from ..utilities.database import connect
from ..utilities.json import dumps from ..utilities.json import dumps
if not timestamp: if not timestamp:
@ -390,4 +391,5 @@ class Moderation(AuroraGuildModel):
case["metadata"], case["metadata"],
) )
if return_obj:
return cls.find_by_id(bot=bot, moderation_id=moderation_id, guild_id=guild_id) return cls.find_by_id(bot=bot, moderation_id=moderation_id, guild_id=guild_id)