Last active 1767655611

Revision e73204dca65e8f83b3ac54b0b3f7519f5b12d3d7

upd_restart.py Raw
1import subprocess
2
3
4@router.message(F.text == "/reboot")
5async def command_handler(msg: types.Message, *args, **kwargs):
6 if msg.from_user.id in [1234567890, 123123123]:
7 subprocess.run(["git", "pull"], check=True, stdout=subprocess.PIPE).stdout
8 python = sys.executable
9 os.execl(python, python, *sys.argv)