lavhost restart

pull/176/head
ZetGo | Aleksej K. 2025-08-25 11:46:10 +03:00
parent 81c15fd312
commit 2fb8a80109
1 changed files with 5 additions and 6 deletions

View File

@ -300,10 +300,6 @@ class UpdaterMod(loader.Module):
# await self._db.remote_force_save()
if "LAVHOST" in os.environ:
await self.client.send_message("lavhostbot", "🔄 Restart")
return
with contextlib.suppress(Exception):
await main.heroku.web.stop()
@ -316,6 +312,11 @@ class UpdaterMod(loader.Module):
if client is not message.client:
await client.disconnect()
if "LAVHOST" in os.environ:
await self.client.send_message("lavhostbot", "🔄 Restart")
await message.client.disconnect()
return
await message.client.disconnect()
restart()
@ -363,8 +364,6 @@ class UpdaterMod(loader.Module):
except subprocess.CalledProcessError:
logger.exception("Req install failed")
async def autoupdate(self): pass
@loader.command()
async def update(self, message: Message):
try: