def find_mainfile(folder):
    """Find the File that the chatbot can read in the directory."""
    for file in folder.iterdir():
        if file.name.endswith("StreamlabsSystem.py"):
            return file
    raise FileNotFoundError