From 7bd9eeac2c5f891533ba221a396171ccd0d7abdf Mon Sep 17 00:00:00 2001 From: Soheab_ <33902984+Soheab@users.noreply.github.com> Date: Fri, 25 Oct 2024 22:49:23 +0200 Subject: [PATCH] Add mention property to PartialMessageable --- discord/channel.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/discord/channel.py b/discord/channel.py index 58fc2524f40b..33c6a176542e 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -3531,6 +3531,14 @@ def permissions_for(self, obj: Any = None, /) -> Permissions: 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.