mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-23 00:13:34 +00:00
Add mention property to PartialMessageable
This commit is contained in:
@ -3529,6 +3529,14 @@ class PartialMessageable(discord.abc.Messageable, Hashable):
|
|||||||
|
|
||||||
return Permissions.none()
|
return Permissions.none()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def mention(self) -> str:
|
||||||
|
""":class:`str`: Returns a string that allows you to mention the channel.
|
||||||
|
|
||||||
|
.. versionadded:: 2.5
|
||||||
|
"""
|
||||||
|
return f'<#{self.id}>'
|
||||||
|
|
||||||
def get_partial_message(self, message_id: int, /) -> PartialMessage:
|
def get_partial_message(self, message_id: int, /) -> PartialMessage:
|
||||||
"""Creates a :class:`PartialMessage` from the message ID.
|
"""Creates a :class:`PartialMessage` from the message ID.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user