schemas: add bio and accent_color

This commit is contained in:
Luna 2021-08-29 15:52:28 -03:00
parent 2a71d9f131
commit 122798c567
1 changed files with 13 additions and 0 deletions

View File

@ -166,6 +166,9 @@ class LitecordValidator(Validator):
def _validate_type_nickname(self, value: str) -> bool:
return isinstance(value, str) and (len(value) < 32)
def _validate_type_rgb_int_color(self, value: int) -> bool:
return isinstance(value, int) and value > 0 and value < 0xFFFFFF
def validate(
reqjson: Optional[Union[Dict, List]],
@ -242,6 +245,16 @@ USER_UPDATE = {
"required": False,
"nullable": True,
},
"bio": {
"type": "string",
"required": False,
"nullable": False,
},
"accent_color": {
"type": "rgb_int_color",
"required": False,
"nullable": True,
},
}
PARTIAL_ROLE_GUILD_CREATE = {