mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-11 04:17:58 +00:00
Add Message.jump_to_url
This commit is contained in:
parent
6b75179c1f
commit
7eb918b19e
@ -434,6 +434,12 @@ class Message:
|
|||||||
"""Optional[datetime.datetime]: A naive UTC datetime object containing the edited time of the message."""
|
"""Optional[datetime.datetime]: A naive UTC datetime object containing the edited time of the message."""
|
||||||
return self._edited_timestamp
|
return self._edited_timestamp
|
||||||
|
|
||||||
|
@property
|
||||||
|
def jump_to_url(self):
|
||||||
|
""":class:`str`: Returns a URL that allows the client to jump to this message."""
|
||||||
|
guild_id = getattr(self.guild, 'id', '@me')
|
||||||
|
return 'https://discordapp.com/channels/{0}/{1.channel.id}?jump={1.id}'.format(guild_id, self)
|
||||||
|
|
||||||
@utils.cached_slot_property('_cs_system_content')
|
@utils.cached_slot_property('_cs_system_content')
|
||||||
def system_content(self):
|
def system_content(self):
|
||||||
"""A property that returns the content that is rendered
|
"""A property that returns the content that is rendered
|
||||||
|
Loading…
x
Reference in New Issue
Block a user