mirror of
https://github.com/majmongoose/PageBot.git
synced 2025-02-03 09:44:23 -05:00
Update pagebot.py
This commit is contained in:
parent
1371411f62
commit
1b3ffe497a
@ -94,8 +94,9 @@ async def upload_to_discord(mp4_file,text):
|
|||||||
print(f"Could not find channel with ID {channel}")
|
print(f"Could not find channel with ID {channel}")
|
||||||
|
|
||||||
def launch_and_watch(program_path):
|
def launch_and_watch(program_path):
|
||||||
|
program_directory = os.path.dirname(program_path)
|
||||||
while True:
|
while True:
|
||||||
process = subprocess.Popen(program_path)
|
process = subprocess.Popen(program_path,cwd=program_directory)
|
||||||
process.wait()
|
process.wait()
|
||||||
if process.returncode != 0:
|
if process.returncode != 0:
|
||||||
print("TTD has crashed. Relaunching...")
|
print("TTD has crashed. Relaunching...")
|
||||||
|
Loading…
Reference in New Issue
Block a user