From c6e4966ef4026a4072b2fa9c77afa5302dc10a56 Mon Sep 17 00:00:00 2001 From: Omkaar <79257339+Pysics@users.noreply.github.com> Date: Sat, 25 Jun 2022 16:11:12 +0530 Subject: [PATCH] Add a `jump_url` property to users --- discord/user.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/discord/user.py b/discord/user.py index 101a3b1e12..3a51f3afea 100644 --- a/discord/user.py +++ b/discord/user.py @@ -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."""