mirror of https://gitlab.com/litecord/litecord.git
Compare commits
No commits in common. "17d0c36343c9cb3744849332a37ae3fe120ad8e7" and "e3ca982efd2537c8df174eb497b58f5a7fad5b42" have entirely different histories.
17d0c36343
...
e3ca982efd
|
|
@ -96,16 +96,6 @@ IDENTIFY_SCHEMA = {
|
||||||
},
|
},
|
||||||
"browser_user_agent": {"type": "string", "required": False},
|
"browser_user_agent": {"type": "string", "required": False},
|
||||||
"browser_version": {"type": "string", "required": False},
|
"browser_version": {"type": "string", "required": False},
|
||||||
"native_build_number": {
|
|
||||||
"type": "number",
|
|
||||||
"required": False,
|
|
||||||
"nullable": True,
|
|
||||||
},
|
|
||||||
"design_id": {
|
|
||||||
"type": "number",
|
|
||||||
"required": False,
|
|
||||||
"nullable": True,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"capabilities": {"type": "number", "required": False},
|
"capabilities": {"type": "number", "required": False},
|
||||||
|
|
@ -135,10 +125,6 @@ IDENTIFY_SCHEMA = {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": False,
|
"required": False,
|
||||||
},
|
},
|
||||||
"api_code_version": {
|
|
||||||
"type": "number",
|
|
||||||
"required": False,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"guild_subscriptions": {"type": "boolean", "required": False},
|
"guild_subscriptions": {"type": "boolean", "required": False},
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,6 @@ async def _compute_supplemental(app, base_ready, user_ready, users_to_send: dict
|
||||||
|
|
||||||
supplemental["guilds"].append(
|
supplemental["guilds"].append(
|
||||||
{
|
{
|
||||||
"embedded_activities": [],
|
|
||||||
"voice_states": [],
|
"voice_states": [],
|
||||||
"id": guild["id"],
|
"id": guild["id"],
|
||||||
}
|
}
|
||||||
|
|
@ -779,12 +778,11 @@ class GatewayWebsocket:
|
||||||
|
|
||||||
async def handle_2(self, payload: Dict[str, Any]):
|
async def handle_2(self, payload: Dict[str, Any]):
|
||||||
"""Handle the OP 2 Identify packet."""
|
"""Handle the OP 2 Identify packet."""
|
||||||
# do not validate given guild_hashes, guild_versions
|
# do not validate given guild_hashes
|
||||||
payload_copy = dict(payload)
|
payload_copy = dict(payload)
|
||||||
client_state = payload_copy["d"].get("client_state")
|
payload_copy["d"].get("client_state", {"guild_hashes": None}).pop(
|
||||||
if client_state:
|
"guild_hashes"
|
||||||
client_state.pop("guild_hashes", None)
|
)
|
||||||
client_state.pop("guild_versions", None)
|
|
||||||
validate(payload_copy, IDENTIFY_SCHEMA)
|
validate(payload_copy, IDENTIFY_SCHEMA)
|
||||||
data = payload["d"]
|
data = payload["d"]
|
||||||
token = data["token"]
|
token = data["token"]
|
||||||
|
|
|
||||||
|
|
@ -236,37 +236,6 @@ class Storage:
|
||||||
# feature won't be impl'd
|
# feature won't be impl'd
|
||||||
drow["guild_scheduled_events"] = []
|
drow["guild_scheduled_events"] = []
|
||||||
|
|
||||||
# this is NOT a part of documented v10 behavior
|
|
||||||
FIELDS_MIRRORED_TO_PROPERTIES = (
|
|
||||||
"max_members",
|
|
||||||
"afk_channel_id",
|
|
||||||
"features",
|
|
||||||
"owner_id",
|
|
||||||
"explicit_content_filter",
|
|
||||||
"verification_level",
|
|
||||||
"mfa_level",
|
|
||||||
"id",
|
|
||||||
"system_channel_id",
|
|
||||||
"afk_timeout",
|
|
||||||
"vanity_url_code",
|
|
||||||
"public_updates_channel_id",
|
|
||||||
"icon",
|
|
||||||
"rules_channel_id",
|
|
||||||
"banner",
|
|
||||||
"nsfw",
|
|
||||||
"discovery_splash",
|
|
||||||
"splash",
|
|
||||||
"default_message_notifications",
|
|
||||||
"application_id",
|
|
||||||
"home_header",
|
|
||||||
"name",
|
|
||||||
"system_channel_flags",
|
|
||||||
"preferred_locale",
|
|
||||||
)
|
|
||||||
drow["properties"] = {}
|
|
||||||
for field in FIELDS_MIRRORED_TO_PROPERTIES:
|
|
||||||
drow["properties"][field] = drow.get(field)
|
|
||||||
|
|
||||||
return drow
|
return drow
|
||||||
|
|
||||||
async def _member_basic(self, guild_id: int, member_id: int):
|
async def _member_basic(self, guild_id: int, member_id: int):
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,6 @@ class WrappedGuild:
|
||||||
voice_states: list
|
voice_states: list
|
||||||
|
|
||||||
large: Optional[bool] = None
|
large: Optional[bool] = None
|
||||||
properties: Optional[dict] = None
|
|
||||||
|
|
||||||
async def delete(self):
|
async def delete(self):
|
||||||
await delete_guild(self.id)
|
await delete_guild(self.id)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue