fix restart

This commit is contained in:
levina 2022-02-11 18:34:22 +07:00 committed by GitHub
parent 568d03ca0c
commit 7ac6a344cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,6 +77,6 @@ async def update_bot(_, message: Message):
async def restart_bot(_, message: Message): async def restart_bot(_, message: Message):
msg = await message.reply("❖ Restarting bot...") msg = await message.reply("❖ Restarting bot...")
args = [sys.executable, "main.py"] args = [sys.executable, "main.py"]
await msg.edit("✅ Bot restarted !\n\n• wait until 1-2 minutes after bot Rebooted.")
execle(sys.executable, *args, environ) execle(sys.executable, *args, environ)
return return
await msg.edit("✅ Bot restarted !\n\n• now bot is working again.")