Open AnzhiZhang opened 2 months ago
[!NOTE] 既然已经计划不只支持qq平台,那该issue是否可以转为考虑做一个全新的插件: ImAPI
以SatoriAPI作为核心插件的架构,主要有如下几个角色
graph TD
%%MCDR
mcdr[Mcdreforged]
%%im-api
subgraph api[ImAPI]
core
subgraph drivers
qq[QQDriver]
kook[KookDriver]
tg[TelegramDriver]
other[...]
end
end
%%satori-sub-plugin
subgraph sub-plugin
subgraph reactor
qq_chat[QQChat]
kookin[KookIn]
other2[...]
end
end
api --注册插件--> mcdr
other2 -.-> api
qq_chat -.-> api
kookin -.-> api
sub-plugin --注册插件--> mcdr
sequenceDiagram
actor player as Player
participant mcdr as MCDReforged
participant api as ImAPI
participant rtr as Reactor
actor plat as Platform
player ->>+ mcdr: start/reload satori
mcdr ->>+ api: load plugin
api ->> api: load drivers
api -->- mcdr: load finish
mcdr ->>+ rtr: load receiver
rtr -->>- mcdr: load finish
mcdr -->>- player: start/reload satori finish
plat ->> api: msg/event from platform
api ->> api: process msg/event
api -) mcdr: send [react] event
mcdr -) rtr: forward [react] event
rtr ->> rtr: process satori event
rtr ->> plat: [optional] reply event
rtr ->> mcdr: [optional] operate mc server
考虑借鉴satori的通信方式进行事件通信 ...
QQ API 2.0 设计方案(征求意见稿)
设计一个新的 MCDR 插件间通信 API
方便其它插件无缝衔接外部聊天软件,且无需考虑协议升级问题,彻底解耦如
aiocqhttp
等第三方依赖升级导致的问题。兼容市面上的多个 QQ 机器人协议
升级为 IM(Instant Messaging)API
既然兼容 Satori 了,何不顺便升级为 IM API 呢?
相关 Issue
185
227