Open AkiraXie opened 3 years ago
感谢!正式迁移时可作为参考。
service层最近有些改动,同时导致了bug #193 ,可能无法直接合入
感谢!正式迁移时可作为参考。
service层最近有些改动,同时导致了bug #193 ,可能无法直接合入
match问题在nb2已经考虑进去了,因为nb2除了event在流转还有一个state在流转,on_regex在处理的时候会将re.match之后的group内容进行保留
nb2有一个比较清晰的事件流转过程,咖啡佬有时间的话可以看一下这个文档https://v2.nonebot.dev/docs/advanced/
如果想保留单一触发原则,可以看一下基于 zerobot 的 hoshino 迁移 https://github.com/AkiraXie/hoshino.go
在今年1月底时候,我尝试性将HoshinoBot迁移到nonebot2,保留了hoshinobot的service层封装。 见于 https://github.com/AkiraXie/hoshino.nb2