diff --git a/discord/channel.py b/discord/channel.py index a306707d6..2ff8e5429 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -3212,6 +3212,11 @@ class DMChannel(discord.abc.Messageable, discord.abc.PrivateChannel, Hashable): """ return f'https://discord.com/channels/@me/{self.id}' + @property + def mention(self) -> str: + """:class:`str`: The string that allows you to mention the channel.""" + return f'<#{self.id}>' + @property def created_at(self) -> datetime.datetime: """:class:`datetime.datetime`: Returns the direct message channel's creation time in UTC.""" @@ -3391,6 +3396,11 @@ class GroupChannel(discord.abc.Messageable, discord.abc.PrivateChannel, Hashable """ return f'https://discord.com/channels/@me/{self.id}' + @property + def mention(self) -> str: + """:class:`str`: The string that allows you to mention the channel.""" + return f'<#{self.id}>' + def permissions_for(self, obj: Snowflake, /) -> Permissions: """Handles permission resolution for a :class:`User`.