aboutsummaryrefslogtreecommitdiff
path: root/discord/permissions.py
diff options
context:
space:
mode:
Diffstat (limited to 'discord/permissions.py')
-rw-r--r--discord/permissions.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/discord/permissions.py b/discord/permissions.py
index d41d22d9..ee0ad555 100644
--- a/discord/permissions.py
+++ b/discord/permissions.py
@@ -36,6 +36,8 @@ class Permissions(object):
+-----------+------------------------------------------+
| x != y | Checks if two permissions are not equal. |
+-----------+------------------------------------------+
+ | hash(x) | Return the permission's hash. |
+ +-----------+------------------------------------------+
Attributes
-----------
@@ -57,6 +59,9 @@ class Permissions(object):
def __ne__(self, other):
return not self.__eq__(other)
+ def __hash__(self):
+ return hash(self.value)
+
@classmethod
def none(cls):
"""A factory method that creates a :class:`Permission` with all