aboutsummaryrefslogtreecommitdiff
path: root/discord/state.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-09-26 06:23:24 -0400
committerRapptz <[email protected]>2020-09-26 06:35:41 -0400
commit28e5b2a5e133970aff7d0f4db1d973c7516e429a (patch)
tree19c6a64fdef16b0e8f3635f80f887136b763c53a /discord/state.py
parentFixed incorrectly named 'Intent' class in doc. (diff)
downloaddiscord.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.py6
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())