WIP: Refactor Aurora (3.0.0) #29
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ class AuroraBaseModel(BaseModel):
|
||||||
|
|
||||||
def to_json(self, indent: int | None = None, file: Any | None = None, **kwargs):
|
def to_json(self, indent: int | None = None, file: Any | None = None, **kwargs):
|
||||||
from ..utilities.json import dump, dumps # pylint: disable=cyclic-import
|
from ..utilities.json import dump, dumps # pylint: disable=cyclic-import
|
||||||
return dump(self.dump(), file, indent=indent, **kwargs) if file else dumps(self.model_dump(exclude={"bot"}), indent=indent, **kwargs)
|
return dump(self.dump(), file, indent=indent, **kwargs) if file else dumps(self.dump(), indent=indent, **kwargs)
|
||||||
|
|
||||||
class AuroraGuildModel(AuroraBaseModel):
|
class AuroraGuildModel(AuroraBaseModel):
|
||||||
"""Subclass of AuroraBaseModel that includes a guild_id attribute and a guild attribute, and a modified to_json() method to match."""
|
"""Subclass of AuroraBaseModel that includes a guild_id attribute and a guild attribute, and a modified to_json() method to match."""
|
||||||
|
|
Loading…
Reference in a new issue