mirror of https://gitlab.com/litecord/litecord.git
gateway.schemas: validate Intents as an int
This commit is contained in:
parent
04b839b969
commit
c0bac8bc21
|
|
@ -61,6 +61,9 @@ async def api_gateway_bot():
|
|||
reset_ts = bucket._window + bucket.second
|
||||
|
||||
# how many seconds until bucket reset
|
||||
# TODO: this logic should be changed to follow update_rate_limit's
|
||||
# except we can't just call it since we don't use it here, but
|
||||
# on the gateway side.
|
||||
reset_after_ts = reset_ts - time.time()
|
||||
|
||||
# reset_after_ts must not be negative
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ from logbook import Logger
|
|||
|
||||
from litecord.gateway.errors import DecodeError
|
||||
from litecord.schemas import LitecordValidator
|
||||
from litecord.enums import Intents
|
||||
|
||||
log = Logger(__name__)
|
||||
|
||||
|
|
@ -64,7 +63,7 @@ IDENTIFY_SCHEMA = {
|
|||
"large_threshold": {"type": "number", "required": False},
|
||||
"shard": {"type": "list", "required": False},
|
||||
"presence": {"type": "dict", "required": False},
|
||||
"intents": {"coerce": Intents, "required": False},
|
||||
"intents": {"type": int, "required": False},
|
||||
# TODO schema
|
||||
"properties": {
|
||||
"type": "dict",
|
||||
|
|
|
|||
Loading…
Reference in New Issue