Ice9Coffee / HoshinoBot

A qqbot for Princess Connect Re:Dive (and other usage :)
GNU General Public License v3.0
1.42k stars 412 forks source link

关于HoshinoBot迁移到nonebot2的可能性 #196

Open AkiraXie opened 3 years ago

AkiraXie commented 3 years ago

在今年1月底时候,我尝试性将HoshinoBot迁移到nonebot2,保留了hoshinobot的service层封装。 见于 https://github.com/AkiraXie/hoshino.nb2

Ice9Coffee commented 3 years ago

感谢!正式迁移时可作为参考。

service层最近有些改动,同时导致了bug #193 ,可能无法直接合入

AkiraXie commented 3 years ago

感谢!正式迁移时可作为参考。

service层最近有些改动,同时导致了bug #193 ,可能无法直接合入

match问题在nb2已经考虑进去了,因为nb2除了event在流转还有一个state在流转,on_regex在处理的时候会将re.match之后的group内容进行保留

AkiraXie commented 3 years ago

nb2有一个比较清晰的事件流转过程,咖啡佬有时间的话可以看一下这个文档https://v2.nonebot.dev/docs/advanced/

AkiraXie commented 2 years ago

如果想保留单一触发原则,可以看一下基于 zerobot 的 hoshino 迁移 https://github.com/AkiraXie/hoshino.go