from typing import Optional
import re


def id_from_mention(message_content: str) -> Optional[int]:
    """Return a user id from an @mention in a message."""
    get_id = re.search(r"\d{18}", message_content)

    if get_id is not None:
        return int(get_id.group())