Try fix nightmode

This commit is contained in:
yasirarism 2023-02-24 22:34:50 +07:00 committed by GitHub
parent bbbff5c2ba
commit 6c24b7713a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +18,7 @@ from pyrogram.raw.all import layer
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
from database.users_chats_db import db
from database.nightmode_db import scheduler
from misskaty import (
BOT_NAME,
BOT_USERNAME,
@ -71,6 +72,8 @@ async def start_bot():
)
except Exception as e:
LOGGER.error(str(e))
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)