Different method of upgrading user instances

This commit is contained in:
Rapptz
2019-07-10 01:23:38 -04:00
parent e75c248a9a
commit 5c1b239b47
3 changed files with 13 additions and 5 deletions

View File

@ -189,11 +189,7 @@ class Member(discord.abc.Messageable, _BaseUser):
@classmethod
def _from_message(cls, *, message, data):
author = message.author
data['user'] = {
attr: getattr(author, attr)
for attr in author.__slots__
if attr[0] != '_'
}
data['user'] = author._to_minimal_user_json()
return cls(data=data, guild=message.guild, state=message._state)
@classmethod