Update __main__.py

This commit is contained in:
yasirarism 2023-02-25 15:27:07 +07:00 committed by GitHub
parent d7282988e2
commit 1579a9e8ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,7 +72,8 @@ async def start_bot():
)
except Exception as e:
LOGGER.error(str(e))
scheduler.start()
if bool(scheduler.get_jobs()):
scheduler.start()
if os.path.exists("restart.pickle"):
with open('restart.pickle', 'rb') as status:
chat_id, message_id = pickle.load(status)