Browse Source

Add mention property to PartialMessageable

pull/10109/head
Soheab 5 months ago
committed by dolfies
parent
commit
833b9133d2
  1. 8
      discord/channel.py

8
discord/channel.py

@ -4589,6 +4589,14 @@ class PartialMessageable(discord.abc.Messageable, Hashable):
"""
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:
"""Creates a :class:`PartialMessage` from the message ID.

Loading…
Cancel
Save