diff options
| author | Rapptz <[email protected]> | 2021-03-28 08:28:39 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-04-06 01:11:36 -0400 |
| commit | 1e7f139313108047ab2870004357084af2e6152f (patch) | |
| tree | 8caaee9060b368989482652ba6473d034df34734 /discord/client.py | |
| parent | [commands] Fix classmethod converters not working. (diff) | |
| download | discord.py-1e7f139313108047ab2870004357084af2e6152f.tar.xz discord.py-1e7f139313108047ab2870004357084af2e6152f.zip | |
Add support for setting application_id
Diffstat (limited to 'discord/client.py')
| -rw-r--r-- | discord/client.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/discord/client.py b/discord/client.py index 180152a1..6d80c9d8 100644 --- a/discord/client.py +++ b/discord/client.py @@ -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() |