def get_from_cache()

in bot/discord_cache.py [0:0]


def get_from_cache(url: str) -> bytes:
    file_path = _get_file_name(url)
    if file_path.is_file():
        return file_path.read_bytes()
    elif not file_path.exists():
        return add_to_cache(url)
    raise FileNotFoundError("Name already used by not-file.")