Browse Source

Add jump_url property to Threads

pull/10109/head
Omkaar 3 years ago
committed by dolfies
parent
commit
ad1d249faf
  1. 9
      discord/threads.py

9
discord/threads.py

@ -248,10 +248,19 @@ class Thread(Messageable, Hashable):
""":class:`datetime.datetime`: Returns the thread's creation time in UTC.
.. note::
This may be inaccurate for threads created before January 9th, 2022.
"""
return self._created_at or snowflake_time(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.

Loading…
Cancel
Save