Team.owner should return a TeamMember.

Should always be available but who knows.
This commit is contained in:
Rapptz 2019-06-30 02:28:55 -04:00
parent c4d1bd7899
commit ba7a319ab0

View File

@ -67,9 +67,8 @@ class Team:
@property
def owner(self):
"""Optional[:class:`User`]: The team's owner, if available from the cache."""
return self._state.get_user(self.owner_id)
"""Optional[:class:`TeamMember`]: The team's owner."""
return utils.get(self.members, id=self.owner_id)
class TeamMember(BaseUser):
"""Represents a team member in a team.