mirror of https://github.com/coddrago/Heroku
fix restart and added stop cmd
parent
962e7ec36a
commit
e333ddfa0d
|
@ -301,7 +301,7 @@ class UpdaterMod(loader.Module):
|
|||
# await self._db.remote_force_save()
|
||||
|
||||
if "LAVHOST" in os.environ:
|
||||
os.system("lavhost restart")
|
||||
await self.client.send_message("lavhostbot", "🔄 Restart")
|
||||
return
|
||||
|
||||
with contextlib.suppress(Exception):
|
||||
|
@ -693,3 +693,15 @@ class UpdaterMod(loader.Module):
|
|||
await asyncio.create_subprocess_shell(f'git reset --hard HEAD~{number}', stdout=asyncio.subprocess.PIPE)
|
||||
await self.restart_common(call)
|
||||
|
||||
@loader.command()
|
||||
async def stop(self, message: Message):
|
||||
"""| stops your userbot"""
|
||||
|
||||
if "LAVHOST" in os.environ:
|
||||
await utils.answer(message, self.strings[" lavhost_stop"]
|
||||
await self.client.send.message("lavhostbot", "⏹ Stop")
|
||||
|
||||
else:
|
||||
await utils.answer(message, self.strings[" ub_stop"]
|
||||
exit()
|
||||
|
||||
|
|
Loading…
Reference in New Issue