fix a bug

This commit is contained in:
xtaodada 2022-08-08 14:43:26 +08:00
parent cfa590aa54
commit d212cbafa3
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

6
ci.py
View File

@ -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"))