wangzhibo
2026-10-08 220e4fab27b7f419b3e89e2f2d28ae789aac09d7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from typing import TYPE_CHECKING
 
if TYPE_CHECKING:
    from core.connection import ConnectionHandler
from core.handle.textMessageHandlerRegistry import TextMessageHandlerRegistry
from core.handle.textMessageProcessor import TextMessageProcessor
 
TAG = __name__
 
# 全局处理器注册表
message_registry = TextMessageHandlerRegistry()
 
# 创建全局消息处理器实例
message_processor = TextMessageProcessor(message_registry)
 
 
async def handleTextMessage(conn: "ConnectionHandler", message):
    """处理文本消息"""
    await message_processor.process_message(conn, message)