async def giblog(event): herokuHelper = HerokuHelper(Var.HEROKU_APP_NAME, Var.HEROKU_API_KEY) logz = herokuHelper.getLog() with open("logs.txt", "w") as log: log.write(logz) await borg.send_file(event.chat_id, "logs.txt", caption=f"**Logs Of {Var.HEROKU_APP_NAME}**")
async def giblog(event): if event.fwd_from: return herokuHelper = HerokuHelper(Config.HEROKU_APP_NAME, Config.HEROKU_API_KEY) logz = herokuHelper.getLog() with open("logs.txt", "w") as log: log.write(logz) await borg.send_file(event.chat_id, "logs.txt", caption=f"**Logs Of {Config.HEROKU_APP_NAME}**")
async def _(event): if event.fwd_from: return await event.edit( "**Restarted ! If You Want To Check If I am Alive, Do** `.ping` !") if Var.HEROKU_API_KEY: herokuHelper = HerokuHelper(Var.HEROKU_APP_NAME, Var.HEROKU_API_KEY) herokuHelper.restart() else: await borg.disconnect() os.execl(sys.executable, sys.executable, *sys.argv)
async def restart_me(event): herokuHelper = HerokuHelper(Var.HEROKU_APP_NAME, Var.HEROKU_API_KEY) await event.edit("`App is Restarting. This is May Take Upto 10Min.`") herokuHelper.restart()
async def restart_me(event): if event.fwd_from: return herokuHelper = HerokuHelper(Config.HEROKU_APP_NAME, Config.HEROKU_API_KEY) await event.edit("`App is Restarting. This is May Take Upto 10Min.`") herokuHelper.restart()