mirror of https://gitlab.com/litecord/litecord.git
schemas: add bio and accent_color
This commit is contained in:
parent
2a71d9f131
commit
122798c567
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue