aboutsummaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-03-21 19:37:04 -0400
committerRapptz <[email protected]>2017-04-30 08:00:10 -0400
commitb24b027d4948da5d0ce9ebfcfb179ce538f00fee (patch)
treeb6908c6221f25c1f56b21a34420bd6bc6f77d13b /discord
parentRevert "Add timeouts for websocket initial connections." (diff)
downloaddiscord.py-b24b027d4948da5d0ce9ebfcfb179ce538f00fee.tar.xz
discord.py-b24b027d4948da5d0ce9ebfcfb179ce538f00fee.zip
Add Permissions.view_audit_logs
Diffstat (limited to 'discord')
-rw-r--r--discord/permissions.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/discord/permissions.py b/discord/permissions.py
index b5b66555..061ffad9 100644
--- a/discord/permissions.py
+++ b/discord/permissions.py
@@ -127,7 +127,7 @@ class Permissions:
def all(cls):
"""A factory method that creates a :class:`Permissions` with all
permissions set to True."""
- return cls(0b01111111111101111111110001111111)
+ return cls(0b01111111111101111111110011111111)
@classmethod
def all_channel(cls):
@@ -148,7 +148,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(0b01111100000000000000000000111111)
+ return cls(0b01111100000000000000000010111111)
@classmethod
def text(cls):
@@ -277,7 +277,16 @@ class Permissions:
def add_reactions(self, value):
self._set(6, value)
- # 4 unused
+ @property
+ def view_audit_logs(self):
+ """Returns True if a user can view the server's audit log."""
+ return self._bit(7)
+
+ @view_audit_logs.setter
+ def view_audit_logs(self, value):
+ self._set(7, value)
+
+ # 2 unused
@property
def read_messages(self):