diff options
| author | Rapptz <[email protected]> | 2020-09-26 06:23:24 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-09-26 06:35:41 -0400 |
| commit | 28e5b2a5e133970aff7d0f4db1d973c7516e429a (patch) | |
| tree | 19c6a64fdef16b0e8f3635f80f887136b763c53a /discord/state.py | |
| parent | Fixed incorrectly named 'Intent' class in doc. (diff) | |
| download | discord.py-28e5b2a5e133970aff7d0f4db1d973c7516e429a.tar.xz discord.py-28e5b2a5e133970aff7d0f4db1d973c7516e429a.zip | |
Add Client.intents to query the current intents
Closes #5854
Diffstat (limited to 'discord/state.py')
| -rw-r--r-- | discord/state.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/discord/state.py b/discord/state.py index 507226cc..aec723d4 100644 --- a/discord/state.py +++ b/discord/state.py @@ -232,6 +232,12 @@ class ConnectionState: return u.id if u else None @property + def intents(self): + ret = Intents.none() + ret.value = self._intents.value + return ret + + @property def voice_clients(self): return list(self._voice_clients.values()) |