Add support for setting application_id

This commit is contained in:
Rapptz
2021-03-28 08:28:39 -04:00
parent 9ab58d302d
commit 1e7f139313
2 changed files with 29 additions and 0 deletions

View File

@ -113,6 +113,8 @@ class Client:
Integer starting at ``0`` and less than :attr:`.shard_count`.
shard_count: Optional[:class:`int`]
The total number of shards.
application_id: :class:`int`
The client's application ID.
intents: :class:`Intents`
The intents that you want to enable for the session. This is a way of
disabling and enabling certain gateway events from triggering and being sent.
@ -306,6 +308,16 @@ class Client:
"""
return self._connection.voice_clients
@property
def application_id(self):
"""Optional[:class:`int`]: The client's application ID.
If this is not passed via ``__init__`` then this is retrieved
through the gateway when an event contains the data. Usually
after :func:`on_connect` is called.
"""
return self._connection.application_id
def is_ready(self):
""":class:`bool`: Specifies if the client's internal cache is ready for use."""
return self._ready.is_set()