WIP: Refactor Aurora (3.0.0) #29
2 changed files with 5 additions and 2 deletions
|
@ -114,6 +114,7 @@ class ImportAuroraView(ui.View):
|
|||
changes=changes,
|
||||
metadata=metadata,
|
||||
database=database,
|
||||
return_obj=False
|
||||
)
|
||||
|
||||
await interaction.edit_original_response(content="Import complete.")
|
||||
|
|
|
@ -298,7 +298,8 @@ class Moderation(AuroraGuildModel):
|
|||
expired: bool | None = None,
|
||||
changes: list | None = None,
|
||||
metadata: dict | None = None,
|
||||
) -> "Moderation":
|
||||
return_obj: bool = True,
|
||||
) -> "Moderation" | None:
|
||||
from ..utilities.database import connect
|
||||
from ..utilities.json import dumps
|
||||
if not timestamp:
|
||||
|
@ -390,4 +391,5 @@ class Moderation(AuroraGuildModel):
|
|||
case["metadata"],
|
||||
)
|
||||
|
||||
if return_obj:
|
||||
return cls.find_by_id(bot=bot, moderation_id=moderation_id, guild_id=guild_id)
|
||||
|
|
Loading…
Reference in a new issue