From f93fa8a0b2f3f347cd0f435fe7799ea27c2a2f98 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 1 Apr 2016 05:48:31 -0400 Subject: [PATCH] User.__str__ now includes the discriminator. --- discord/user.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/discord/user.py b/discord/user.py index 87bd0397a..ab24edb21 100644 --- a/discord/user.py +++ b/discord/user.py @@ -32,17 +32,17 @@ class User: Supported Operations: - +-----------+------------------------------------+ - | Operation | Description | - +===========+====================================+ - | x == y | Checks if two users are equal. | - +-----------+------------------------------------+ - | x != y | Checks if two users are not equal. | - +-----------+------------------------------------+ - | hash(x) | Return the user's hash. | - +-----------+------------------------------------+ - | str(x) | Returns the user's name. | - +-----------+------------------------------------+ + +-----------+---------------------------------------------+ + | Operation | Description | + +===========+=============================================+ + | x == y | Checks if two users are equal. | + +-----------+---------------------------------------------+ + | x != y | Checks if two users are not equal. | + +-----------+---------------------------------------------+ + | hash(x) | Return the user's hash. | + +-----------+---------------------------------------------+ + | str(x) | Returns the user's name with discriminator. | + +-----------+---------------------------------------------+ Attributes ----------- @@ -65,7 +65,7 @@ class User: self.avatar = kwargs.get('avatar') def __str__(self): - return self.name + return '{0.name}#{0.discriminator}'.format(self) def __eq__(self, other): return isinstance(other, User) and other.id == self.id