DON'T UPDATE THIS COMMIT! WAIT UNTIL FURTHER NOTICE.

This commit is contained in:
Hafitz Setya 2021-08-04 13:48:16 +07:00 committed by GitHub
parent 0fb94cb166
commit 82cb9b2212
Signed by untrusted user: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,7 @@ from bot.helper.telegram_helper.bot_commands import BotCommands
REPO_ = UPSTREAM_REPO
BRANCH_ = UPSTREAM_BRANCH
# Update Command
@app.on_message(filters.command([BotCommands.UpdateCommand, f'{BotCommands.UpdateCommand}@{bot.username}']) & filters.user(OWNER_ID))
@ -56,6 +57,7 @@ async def update_it(client, message):
ups_rem.pull(UPSTREAM_BRANCH)
except GitCommandError:
repo.git.reset("--hard", "FETCH_HEAD")
subprocess.run(["pip3", "install", "--no-cache-dir", "-r", "requirements"])
await msg_.edit("`Updated Sucessfully! Give Me Some Time To Restart!`")
with open("./aria.sh", 'rb') as file:
script = file.read()