diff --git a/discord/channel.py b/discord/channel.py index cd5490b2e..e557f59aa 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -2935,6 +2935,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.""" @@ -3114,6 +3119,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`.