fix restart
This commit is contained in:
parent
568d03ca0c
commit
7ac6a344cf
@ -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.")
|
|
||||||
|
Loading…
Reference in New Issue
Block a user