diff options
| author | Rapptz <[email protected]> | 2015-12-17 00:30:08 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-12-17 00:32:54 -0500 |
| commit | 51d91c2a82e01275d1c1d888319f1db14dc11791 (patch) | |
| tree | 80aeac8f9a7d2c9be21e775c9185bec34cb10756 /discord/permissions.py | |
| parent | Add Message.clean_content property to get prettified mentions. (diff) | |
| download | discord.py-51d91c2a82e01275d1c1d888319f1db14dc11791.tar.xz discord.py-51d91c2a82e01275d1c1d888319f1db14dc11791.zip | |
Most data classes now support hashing.
Diffstat (limited to 'discord/permissions.py')
| -rw-r--r-- | discord/permissions.py | 5 |
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 |