misc(aurora): allow Moderation.log()
to skip returning the class object
This commit is contained in:
parent
720e100a20
commit
b252343dc0
2 changed files with 5 additions and 2 deletions
|
@ -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.")
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue