app/liteyuki/session/__init__.py

25 lines
517 B
Python
Raw Normal View History

2024-08-19 23:47:39 +08:00
# -*- coding: utf-8 -*-
"""
2024-10-19 21:10:18 +08:00
该模块参考并引用了nonebot-plugin-alconna的消息段定义
2024-08-19 23:47:39 +08:00
"""
2024-10-19 21:10:18 +08:00
from typing import Any
2024-10-19 21:15:37 +08:00
from typing import Iterable
2024-10-19 21:10:18 +08:00
from magicoca import Chan, select
2024-10-20 20:59:30 +08:00
from liteyuki.log import logger
2024-10-23 01:04:42 +08:00
from .models import *
2024-10-19 21:10:18 +08:00
def message_handler_thread(i_chans: Iterable[Chan[Any]]):
"""
Args:
i_chans: 多路输入管道组
Returns:
"""
for msg in select(*i_chans):
2024-10-20 20:59:30 +08:00
logger.debug(f"Recv from anybot {msg}")
2024-10-23 01:04:42 +08:00
logger.info(f"Recv from anybot {msg}")
pass