Add jump_url property to Threads

This commit is contained in:
Omkaar 2022-04-13 11:30:43 +05:30 committed by GitHub
parent 242d3f7ab7
commit a6ce49833c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -235,6 +235,14 @@ class Thread(Messageable, Hashable):
""":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.