WIP: Moderation type registry #26
1 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,9 @@
|
||||||
import json
|
import json
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
|
from redbot.core.bot import Red
|
||||||
|
|
||||||
|
|
||||||
from aurora.models import AuroraBaseModel
|
from aurora.models import AuroraBaseModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,6 +15,8 @@ class JSONEncoder(json.JSONEncoder):
|
||||||
return str(o)
|
return str(o)
|
||||||
if isinstance(o, AuroraBaseModel):
|
if isinstance(o, AuroraBaseModel):
|
||||||
return o.to_json()
|
return o.to_json()
|
||||||
|
if isinstance(o, Red):
|
||||||
|
return None
|
||||||
return super().default(o)
|
return super().default(o)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue