From 7f9535704137b16c663c17e8c1865375cfd226f7 Mon Sep 17 00:00:00 2001 From: Soheab <33902984+Soheab@users.noreply.github.com> Date: Sun, 1 Dec 2024 22:10:19 +0100 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 02dd9024beb1..f7ba9c25f49d 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -3529,6 +3529,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.