def truncate(text: str, max: int = 50) -> str:
    """
    Reduces the string to `max` length, by trimming the message into "...".

    Parameters
    ----------
    text : str
        The text to trim.
    max : int, optional
        The max length of the text.
        Defaults to 50.

    Returns
    -------
    str
        The truncated text.
    """
    return text[:max-3].strip() + '...' if len(text) > max else text