feat(aurora): use the type_registry in the Moderation object
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Failing after 28s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 41s

This commit is contained in:
Seaswimmer 2024-07-06 12:03:49 -04:00
parent 134e787c42
commit 08512d0dad
Signed by: cswimr
GPG key ID: 3813315477F26F82
2 changed files with 12 additions and 3 deletions

View file

@ -5,6 +5,7 @@ from typing import Any
from redbot.core.bot import Red
from ..models.base import AuroraBaseModel
from ..models.type import Type
class JSONEncoder(json.JSONEncoder):
@ -16,6 +17,8 @@ class JSONEncoder(json.JSONEncoder):
return str(o)
case AuroraBaseModel():
return o.dump()
case Type():
return o.moderation_type
case Red():
return None
case _: