From 833b9133d29ca7a8d697e5bba6f4cfec3082105c 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 743999afa..76e4bb896 100644 --- a/discord/channel.py +++ b/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.