import subprocess import os # Clone the repository subprocess.run(["git", "clone", "https://gitlab.com/telegrambots4375203/PyroFilesStoreBot.git"]) # Change to the cloned directory if it exists target_directory = "PyroFilesStoreBot" if os.path.exists(target_directory) and os.path.isdir(target_directory): os.chdir(target_directory) # Install dependencies subprocess.run(["pip", "install", "-r", "requirements.txt"]) # Run the Python script subprocess.run(["python", "bot.py"]) else: print(f"Error: Directory '{target_directory}' not found.")