aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh B <[email protected]>2019-11-06 21:25:34 +1000
committerRapptz <[email protected]>2019-11-15 04:23:26 -0500
commit46246a2844c7325ced2983b453bee7d0c1ebbadc (patch)
tree6b8ed4720ec65fb083562cd76c5bef2224734ba6
parentAdded Optional to ClientUser.premium_type type hint (diff)
downloaddiscord.py-46246a2844c7325ced2983b453bee7d0c1ebbadc.tar.xz
discord.py-46246a2844c7325ced2983b453bee7d0c1ebbadc.zip
Add view_guild_insights permission
-rw-r--r--discord/permissions.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/discord/permissions.py b/discord/permissions.py
index 45db34f5..1c814b0e 100644
--- a/discord/permissions.py
+++ b/discord/permissions.py
@@ -133,7 +133,7 @@ class Permissions:
def all(cls):
"""A factory method that creates a :class:`Permissions` with all
permissions set to True."""
- return cls(0b01111111111101111111111111111111)
+ return cls(0b01111111111111111111111111111111)
@classmethod
def all_channel(cls):
@@ -154,7 +154,7 @@ class Permissions:
def general(cls):
"""A factory method that creates a :class:`Permissions` with all
"General" permissions from the official Discord UI set to ``True``."""
- return cls(0b01111100000000000000000010111111)
+ return cls(0b01111100000010000000000010111111)
@classmethod
def text(cls):
@@ -397,7 +397,17 @@ class Permissions:
def external_emojis(self, value):
self._set(18, value)
- # 1 unused
+ @property
+ def view_guild_insights(self):
+ """:class:`bool`: Returns ``True`` if a user can view the guild's insights.
+
+ .. versionadded:: 1.3.0
+ """
+ return self._bit(19)
+
+ @view_guild_insights.setter
+ def view_guild_insights(self, value):
+ self._set(19, value)
@property
def connect(self):