优化代码
This commit is contained in:
@@ -11,6 +11,7 @@ from loguru import logger
|
||||
from wechat_ipad.models.message import WxMessage
|
||||
|
||||
|
||||
# demo 类,不需要关注
|
||||
async def bot_core():
|
||||
# 读取 config.toml 文件
|
||||
with open("config.toml", "rb") as f:
|
||||
@@ -150,6 +151,5 @@ async def bot_core():
|
||||
# 使用异步睡眠替代忙等待循环
|
||||
await asyncio.sleep(0.5)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
asyncio.run(bot_core())
|
||||
# if __name__ == '__main__':
|
||||
# asyncio.run(bot_core())
|
||||
|
||||
Reference in New Issue
Block a user