@utils.cached_slot_property('<STR_LIT>')<EOL><INDENT>def clean_content(self):<DEDENT>
transformations = {<EOL>re.escape('<STR_LIT>' % channel.id): '<STR_LIT:#>' + channel.name<EOL>for channel in self.channel_mentions<EOL>}<EOL>mention_transforms = {<EOL>re.escape('<STR_LIT>' % member.id): '<STR_LIT:@>' + member.display_name<EOL>for member in self.mentions<EOL>}<EOL>second_mention_transforms = {<EOL>re.escape('<STR_LIT>' % member.id): '<STR_LIT:@>' + member.display_name<EOL>for member in self.mentions<EOL>}<EOL>transformations.update(mention_transforms)<EOL>transformations.update(second_mention_transforms)<EOL>if self.guild is not None:<EOL><INDENT>role_transforms = {<EOL>re.escape('<STR_LIT>' % role.id): '<STR_LIT:@>' + role.name<EOL>for role in self.role_mentions<EOL>}<EOL>transformations.update(role_transforms)<EOL><DEDENT>def repl(obj):<EOL><INDENT>return transformations.get(re.escape(obj.group(<NUM_LIT:0>)), '<STR_LIT>')<EOL><DEDENT>pattern = re.compile('<STR_LIT:|>'.join(transformations.keys()))<EOL>result = pattern.sub(repl, self.content)<EOL>transformations = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'<EOL>}<EOL>def repl2(obj):<EOL><INDENT>return transformations.get(obj.group(<NUM_LIT:0>), '<STR_LIT>')<EOL><DEDENT>pattern = re.compile('<STR_LIT:|>'.join(transformations.keys()))<EOL>return pattern.sub(repl2, result)<EOL>
A property that returns the content in a "cleaned up"
        manner. This basically means that mentions are transformed
        into the way the client shows it. e.g. ``<#id>`` will transform
        into ``#name``.

        This will also transform @everyone and @here mentions into
        non-mentions.

        .. note::

            This *does not* escape markdown. If you want to escape
            markdown then use :func:`utils.escape_markdown` along
            with this function.