From 6a1ad9629b0337f56e34aa617c1392269c057b40 Mon Sep 17 00:00:00 2001 From: Omkaar <79257339+Pysics@users.noreply.github.com> Date: Wed, 13 Apr 2022 09:25:21 +0530 Subject: [PATCH 1/3] Add `jump_url` Property to Threads --- discord/threads.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/discord/threads.py b/discord/threads.py index 386aaabff3..fe26103dc5 100644 --- a/discord/threads.py +++ b/discord/threads.py @@ -223,6 +223,14 @@ def mention(self) -> str: """:class:`str`: The string that allows you to mention the thread.""" return f"<#{self.id}>" + @property + def jump_url(self) -> str: + """:class:`str`: The string that allows you to mention the thread. + + .. versionadded:: 2.0 + """ + return f'https://discord.com/channels/{self.guild.id}/{self.id}' + @property def members(self) -> List[ThreadMember]: """List[:class:`ThreadMember`]: A list of thread members in this thread. From 1a522fc6f434ac0729204b4920166e7a46131c2a Mon Sep 17 00:00:00 2001 From: krittick Date: Wed, 13 Apr 2022 09:22:28 -0700 Subject: [PATCH 2/3] Update discord/threads.py --- discord/threads.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/threads.py b/discord/threads.py index fe26103dc5..4347121bcf 100644 --- a/discord/threads.py +++ b/discord/threads.py @@ -229,7 +229,7 @@ def jump_url(self) -> str: .. versionadded:: 2.0 """ - return f'https://discord.com/channels/{self.guild.id}/{self.id}' + return f"https://discord.com/channels/{self.guild.id}/{self.id}" @property def members(self) -> List[ThreadMember]: From c7e57f0fc6c8f002f96ddb5f13681ca7b22596c4 Mon Sep 17 00:00:00 2001 From: krittick Date: Wed, 13 Apr 2022 13:23:20 -0700 Subject: [PATCH 3/3] Update discord/threads.py --- discord/threads.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/threads.py b/discord/threads.py index 4347121bcf..7577b246a5 100644 --- a/discord/threads.py +++ b/discord/threads.py @@ -225,7 +225,7 @@ def mention(self) -> str: @property def jump_url(self) -> str: - """:class:`str`: The string that allows you to mention the thread. + """:class:`str`: Returns a URL that allows the client to jump to the thread. .. versionadded:: 2.0 """