refactor(managers): 重构单例管理器实现并优化代码结构

feat(ws_pool): 新增 WebSocket 连接池实现

perf(json): 使用 orjson 替代标准 json 库提升性能

style: 清理未使用的导入和冗余代码

docs: 更新架构文档和开发规范

test: 添加 WebSocket 连接池测试用例

fix(plugins): 修复自动审批插件 API 调用参数格式
This commit is contained in:
2026-01-22 16:23:03 +08:00
parent d7d732ff4d
commit caf5b06097
42 changed files with 1285 additions and 261 deletions

View File

@@ -25,8 +25,10 @@ async def handle_friend_request(bot: Bot, event: FriendRequestEvent):
# 自动同意好友请求
await bot.call_api(
"set_friend_add_request",
flag=event.flag,
approve=True
params={
"flag": event.flag,
"approve": True
}
)
print(f"[自动同意] 已同意用户 {event.user_id} 的好友请求")
except Exception as e:
@@ -44,9 +46,11 @@ async def handle_group_request(bot: Bot, event: GroupRequestEvent):
# 自动同意群聊邀请
await bot.call_api(
"set_group_add_request",
flag=event.flag,
sub_type=event.sub_type,
approve=True
params={
"flag": event.flag,
"sub_type": event.sub_type,
"approve": True
}
)
print(f"[自动同意] 已同意加入群聊 {event.group_id} (邀请人: {event.user_id})")
except Exception as e: