async def iterate_roles(author, users: list):
    """Iterates through the author's Discord roles.

    Checks whether any of the author's Discord roles or
    the author's id itself are in a list of
    authorized `users`.

    Called by `check_roles`.

    Args:
        author (discord.Member): the command user
        users (list): users to iterate through

    Returns:
        bool: True if author is authorized; False otherwise

    """
    if users and author.id in users:
        return True
    elif author.roles:
        for role in author.roles:
            try:
                if role.id in users:
                    return True
            except:
                pass
    return False