From 53f77db105cfdf46cef7d8860f4fa0c691d02772 Mon Sep 17 00:00:00 2001 From: xtao-dada Date: Sat, 5 Mar 2022 16:32:12 +0800 Subject: [PATCH] [fix] a bug --- main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 90e3f10..a950a09 100644 --- a/main.py +++ b/main.py @@ -1,9 +1,14 @@ import logging +import threading + +from pyrogram import idle + from ci import app as bot from app import app # 日志记录 logging.basicConfig(level=logging.INFO) bot.start() -app.run("0.0.0.0", port=10111) +threading.Thread(target=app.run, kwargs={"host": "0.0.0.0", "port": "10111"}, daemon=True).start() +idle() bot.stop()