Browse Source

chore: Lint pass

pull/10109/head
dolfies 5 months ago
parent
commit
226f20024d
  1. 12
      discord/guild.py
  2. 1
      discord/types/voice.py
  3. 2
      discord/utils.py

12
discord/guild.py

@ -333,7 +333,7 @@ class Guild(Hashable):
.. versionchanged:: 2.1
Removed ``application_command_counts`` as it is no longer provided by Discord.
Removed ``application_command_counts`` and ``application_command_count`` as they are no longer provided by Discord.
Attributes
----------
@ -1309,16 +1309,6 @@ class Guild(Hashable):
"""
return self._presence_count
@property
def application_command_count(self) -> Optional[int]:
"""Optional[:class:`int`]: Returns the application command count, if available.
.. versionadded:: 2.0
"""
counts = self.application_command_counts
if counts:
sum(counts)
@property
def chunked(self) -> bool:
""":class:`bool`: Returns a boolean indicating if the guild is "chunked".

1
discord/types/voice.py

@ -39,6 +39,7 @@ TransportEncryptionModes = Literal[
'xsalsa20_poly1305_lite',
]
class BaseVoiceState(TypedDict):
user_id: Snowflake
session_id: str

2
discord/utils.py

@ -726,7 +726,7 @@ if HAS_ORJSON:
def _to_json(obj: Any) -> str:
return orjson.dumps(obj, default=_handle_metadata).decode('utf-8')
_from_json = orjson.loads # type: ignore
_from_json = orjson.loads
else:

Loading…
Cancel
Save