__init__.py 252 B

123456789101112
  1. import subprocess
  2. import os
  3. import time
  4. dirname, filename = os.path.split(os.path.abspath(__file__))
  5. command = "python3 " + dirname + "/bot.py"
  6. while True:
  7. subprocess.run(command, shell = True)
  8. print("Process finished, restarting")
  9. time.sleep(10)