diff options
Diffstat (limited to 'discord/user.py')
| -rw-r--r-- | discord/user.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/discord/user.py b/discord/user.py index a5ef2edb..d2f149c3 100644 --- a/discord/user.py +++ b/discord/user.py @@ -36,6 +36,8 @@ class User: +-----------+------------------------------------+ | x != y | Checks if two users are not equal. | +-----------+------------------------------------+ + | hash(x) | Return the user's hash. | + +-----------+------------------------------------+ | str(x) | Returns the user's name. | +-----------+------------------------------------+ @@ -66,6 +68,9 @@ class User: def __ne__(self, other): return not self.__eq__(other) + def __hash__(self): + return hash(self.id) + @property def avatar_url(self): """Returns a friendly URL version of the avatar variable the user has. An empty string if |