aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-06-30 02:28:55 -0400
committerRapptz <[email protected]>2019-06-30 02:34:42 -0400
commitba7a319ab03c87fb4105f985677432f258fdc3f7 (patch)
treed097a3146a9a486d45a1759d3b24c918aa38e507
parentTeamMember inherits from BaseUser instead of attribute. (diff)
downloaddiscord.py-ba7a319ab03c87fb4105f985677432f258fdc3f7.tar.xz
discord.py-ba7a319ab03c87fb4105f985677432f258fdc3f7.zip
Team.owner should return a TeamMember.
Should always be available but who knows.
-rw-r--r--discord/team.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/discord/team.py b/discord/team.py
index 494b3a78..422e5300 100644
--- a/discord/team.py
+++ b/discord/team.py
@@ -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.