def remove_mentions(self, string):
def replace(obj, *, transforms=self.MENTION_TRANSFORMS):<EOL><INDENT>return transforms.get(obj.group(<NUM_LIT:0>), '<STR_LIT>')<EOL><DEDENT>return self.MENTION_PATTERN.sub(replace, string)<EOL>
Removes mentions from the string to prevent abuse.

        This includes ``@everyone``, ``@here``, member mentions and role mentions.