mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-08 04:38:42 +00:00
Add mention property to PartialMessageable
This commit is contained in:
parent
e1b6310ef3
commit
7f95357041
@ -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.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user