1515from git import Repo
1616from git .exc import GitCommandError , InvalidGitRepositoryError , NoSuchPathError
1717
18- from userbot import (CMD_HELP , HEROKU_API_KEY , HEROKU_APP_NAME , UPSTREAM_REPO_URL , UPSTREAM_REPO_BRANCH )
18+ from userbot import (BOTLOG , BOTLOG_CHATID , CMD_HELP , HEROKU_API_KEY , HEROKU_APP_NAME , UPSTREAM_REPO_URL , UPSTREAM_REPO_BRANCH )
1919from userbot .events import register
2020
2121requirements_path = path .join (
@@ -84,6 +84,12 @@ async def deploy(event, repo, ups_rem, ac_br, txt):
8484 return repo .__del__ ()
8585 await event .edit ('`Successfully Updated!\n '
8686 'Restarting, please wait...`' )
87+
88+ if BOTLOG :
89+ await event .client .send_message (
90+ BOTLOG_CHATID , "#UPDATE \n "
91+ "Your One4uBot was successfully updated" )
92+
8793 else :
8894 await event .edit ('`[HEROKU]:'
8995 '\n Please set up` **HEROKU_API_KEY** `variable.`'
@@ -99,6 +105,12 @@ async def update(event, repo, ups_rem, ac_br):
99105 await update_requirements ()
100106 await event .edit ('`Successfully Updated!\n '
101107 'Bot is restarting... Wait for a second!`' )
108+
109+ if BOTLOG :
110+ await event .client .send_message (
111+ BOTLOG_CHATID , "#UPDATE \n "
112+ "Your One4uBot was successfully updated" )
113+
102114 # Spin a new instance of bot
103115 args = [sys .executable , "-m" , "userbot" ]
104116 execle (sys .executable , * args , environ )
0 commit comments