diff options
| author | Rapptz <[email protected]> | 2017-05-18 05:12:48 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-05-18 05:12:48 -0400 |
| commit | 8e34a256a4c9302d096d989b97ff5b22b050b149 (patch) | |
| tree | 041d4e143b8022935164f07bb3fd306cc54d74a2 /discord/user.py | |
| parent | Lazy fix for active class when viewport is too small for sidebar. (diff) | |
| download | discord.py-8e34a256a4c9302d096d989b97ff5b22b050b149.tar.xz discord.py-8e34a256a4c9302d096d989b97ff5b22b050b149.zip | |
Fix User == Member comparisons.
Diffstat (limited to 'discord/user.py')
| -rw-r--r-- | discord/user.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/user.py b/discord/user.py index e7171b3c..e5cb8f5f 100644 --- a/discord/user.py +++ b/discord/user.py @@ -35,7 +35,7 @@ import asyncio Profile = namedtuple('Profile', 'premium user mutual_guilds connected_accounts premium_since') -class BaseUser: +class BaseUser(discord.abc.User): __slots__ = ('name', 'id', 'discriminator', 'avatar', 'bot', '_state') def __init__(self, *, state, data): @@ -50,7 +50,7 @@ class BaseUser: return '{0.name}#{0.discriminator}'.format(self) def __eq__(self, other): - return isinstance(other, BaseUser) and other.id == self.id + return isinstance(other, discord.abc.User) and other.id == self.id def __ne__(self, other): return not self.__eq__(other) |