From d212cbafa3756e8743505dfa94424d4411c88003 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Mon, 8 Aug 2022 14:43:26 +0800 Subject: [PATCH] fix a bug --- ci.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ci.py b/ci.py index 3031f85..7e2efa3 100644 --- a/ci.py +++ b/ci.py @@ -25,6 +25,10 @@ config.read("config.ini") bot_token: str = "" admin_id: int = 0 channel_id: int = 0 +api_id: int = 0 +api_hash: str = "" +api_id = config.getint("pyrogram", "api_id", fallback=api_id) +api_hash = config.get("pyrogram", "api_hash", fallback=api_hash) bot_token = config.get("basic", "bot_token", fallback=bot_token) admin_id = config.getint("basic", "admin", fallback=admin_id) channel_id = config.getint("basic", "channel_id", fallback=channel_id) @@ -50,4 +54,4 @@ scheduler = AsyncIOScheduler() if not scheduler.running: scheduler.configure(timezone="Asia/ShangHai") scheduler.start() -app = Client("bot", bot_token=bot_token) +app = Client("bot", api_id=api_id, api_hash=api_hash, bot_token=bot_token, plugins=dict(root="plugins"))