mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 10:22:59 +00:00
Add jump_url property to channels
This commit is contained in:
@ -501,6 +501,14 @@ class GuildChannel:
|
||||
""":class:`str`: The string that allows you to mention the channel."""
|
||||
return f'<#{self.id}>'
|
||||
|
||||
@property
|
||||
def jump_url(self) -> str:
|
||||
""":class:`str`: Returns a URL that allows the client to jump to the channel.
|
||||
|
||||
.. versionadded:: 2.0
|
||||
"""
|
||||
return f'https://discord.com/channels/{self.guild.id}/{self.id}'
|
||||
|
||||
@property
|
||||
def created_at(self) -> datetime:
|
||||
""":class:`datetime.datetime`: Returns the channel's creation time in UTC."""
|
||||
|
Reference in New Issue
Block a user