Lucas
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
3 deletions
-
discord/member.py
-
discord/user.py
|
|
@ -290,12 +290,12 @@ class Member(discord.abc.Messageable, _BaseUser): |
|
|
|
|
|
|
|
def _update_inner_user(self, user): |
|
|
|
u = self._user |
|
|
|
original = (u.name, u.avatar, u.discriminator) |
|
|
|
original = (u.name, u.avatar, u.discriminator, u._public_flags) |
|
|
|
# These keys seem to always be available |
|
|
|
modified = (user['username'], user['avatar'], user['discriminator']) |
|
|
|
modified = (user['username'], user['avatar'], user['discriminator'], user.get('public_flags', 0)) |
|
|
|
if original != modified: |
|
|
|
to_return = User._copy(self._user) |
|
|
|
u.name, u.avatar, u.discriminator = modified |
|
|
|
u.name, u.avatar, u.discriminator, u._public_flags = modified |
|
|
|
# Signal to dispatch on_user_update |
|
|
|
return to_return, u |
|
|
|
|
|
|
|
|
|
@ -120,6 +120,7 @@ class BaseUser(_BaseUser): |
|
|
|
self.avatar = user.avatar |
|
|
|
self.bot = user.bot |
|
|
|
self._state = user._state |
|
|
|
self._public_flags = user._public_flags |
|
|
|
|
|
|
|
return self |
|
|
|
|
|
|
|