From 1a9726087a022a63156c21094509370bc734a5b5 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 8 Apr 2019 06:34:28 -0400 Subject: [PATCH] GUILD_MEMBER_UPDATE no longer does actual user updates. This had been delegated to PRESENCE_UPDATE a long time ago, unfortunately. --- discord/member.py | 8 +------- discord/state.py | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/discord/member.py b/discord/member.py index b2eb9db91..b3961cf27 100644 --- a/discord/member.py +++ b/discord/member.py @@ -210,13 +210,7 @@ class Member(discord.abc.Messageable, _BaseUser): def _update_roles(self, data): self._roles = utils.SnowflakeList(map(int, data['roles'])) - def _update(self, data, user=None): - if user: - self._user.name = user['username'] - self._user.discriminator = user['discriminator'] - self._user.avatar = user['avatar'] - self._user.bot = user.get('bot', False) - + def _update(self, data): # the nickname change is optional, # if it isn't in the payload then it didn't change try: diff --git a/discord/state.py b/discord/state.py index 11c586125..ab3f2ac7b 100644 --- a/discord/state.py +++ b/discord/state.py @@ -604,7 +604,7 @@ class ConnectionState: member = guild.get_member(user_id) if member is not None: old_member = copy.copy(member) - member._update(data, user) + member._update(data) self.dispatch('member_update', old_member, member) else: log.warning('GUILD_MEMBER_UPDATE referencing an unknown member ID: %s. Discarding.', user_id)