def escape_mentions(text: str) -> str:
    'A helper function that escapes everyone, here, role, and user mentions.\n\n    .. note::\n\n        This does not include channel mentions.\n\n    .. note::\n\n        For more granular control over what mentions should be escaped\n        within messages, refer to the :class:`~discord.AllowedMentions`\n        class.\n\n    Parameters\n    -----------\n    text: :class:`str`\n        The text to escape mentions from.\n\n    Returns\n    --------\n    :class:`str`\n        The text with the mentions removed.\n    '
    return re.sub('@(everyone|here|[!&]?[0-9]{17,20})', '@\u200b\\1', text)
A helper function that escapes everyone, here, role, and user mentions.

.. note::

    This does not include channel mentions.

.. note::

    For more granular control over what mentions should be escaped
    within messages, refer to the :class:`~discord.AllowedMentions`
    class.

Parameters
-----------
text: :class:`str`
    The text to escape mentions from.

Returns
--------
:class:`str`
    The text with the mentions removed.
def escape_mentions(text: str) -> str:
    'A helper function that escapes everyone, here, role, and user mentions.\n\n    .. note::\n\n        This does not include channel mentions.\n\n    .. note::\n\n        For more granular control over what mentions should be escaped\n        within messages, refer to the :class:`~discord.AllowedMentions`\n        class.\n\n    Parameters\n    -----------\n    text: :class:`str`\n        The text to escape mentions from.\n\n    Returns\n    --------\n    :class:`str`\n        The text with the mentions removed.\n    '
    return re.sub('@(everyone|here|[!&]?[0-9]{17,20})', '@\u200b\\1', text)