Skip to content

Commit

Permalink
Add a jump_url property to users
Browse files Browse the repository at this point in the history
  • Loading branch information
Ombucha authored and Lulalaby committed Jun 25, 2022
1 parent a58c341 commit c6e4966
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions discord/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ def _to_minimal_user_json(self) -> Dict[str, Any]:
"bot": self.bot,
}

@property
def jump_url(self) -> str:
""":class:`str`: Returns a URL that allows the client to jump to the user.
.. versionadded:: 2.0
"""
return f"https://discord.com/users/{self.id}"

@property
def public_flags(self) -> PublicUserFlags:
""":class:`PublicUserFlags`: The publicly available flags the user has."""
Expand Down

0 comments on commit c6e4966

Please sign in to comment.