Compare commits

..

No commits in common. "17d0c36343c9cb3744849332a37ae3fe120ad8e7" and "e3ca982efd2537c8df174eb497b58f5a7fad5b42" have entirely different histories.

4 changed files with 4 additions and 52 deletions

View File

@ -96,16 +96,6 @@ IDENTIFY_SCHEMA = {
},
"browser_user_agent": {"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},
@ -135,10 +125,6 @@ IDENTIFY_SCHEMA = {
"type": "string",
"required": False,
},
"api_code_version": {
"type": "number",
"required": False,
},
},
},
"guild_subscriptions": {"type": "boolean", "required": False},

View File

@ -167,7 +167,6 @@ async def _compute_supplemental(app, base_ready, user_ready, users_to_send: dict
supplemental["guilds"].append(
{
"embedded_activities": [],
"voice_states": [],
"id": guild["id"],
}
@ -779,12 +778,11 @@ class GatewayWebsocket:
async def handle_2(self, payload: Dict[str, Any]):
"""Handle the OP 2 Identify packet."""
# do not validate given guild_hashes, guild_versions
# do not validate given guild_hashes
payload_copy = dict(payload)
client_state = payload_copy["d"].get("client_state")
if client_state:
client_state.pop("guild_hashes", None)
client_state.pop("guild_versions", None)
payload_copy["d"].get("client_state", {"guild_hashes": None}).pop(
"guild_hashes"
)
validate(payload_copy, IDENTIFY_SCHEMA)
data = payload["d"]
token = data["token"]

View File

@ -236,37 +236,6 @@ class Storage:
# feature won't be impl'd
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
async def _member_basic(self, guild_id: int, member_id: int):

View File

@ -143,7 +143,6 @@ class WrappedGuild:
voice_states: list
large: Optional[bool] = None
properties: Optional[dict] = None
async def delete(self):
await delete_guild(self.id)