Skip to content

Nonebot Plugin Alconna 0.14.0

Compare
Choose a tag to compare
@RF-Tar-Railt RF-Tar-Railt released this 13 Aug 14:59
· 463 commits to master since this release
  • 新增通用标注 Reply:
     class Reply(Segment):
         id: str
         msg: Optional[str]
  • 新增规则 seg_match 与对应的依赖注入 SegMatchMessageSegMatchResult, 用于配合通用标注:
     from nonebot_plugin_alconna import Image, seg_match, SegMatchResult
     
     xxx = on_message(rule=seg_match(Image))
     
     @xxx.handle()
     async def _(image: Image = SegMatchResult(Image)):
         await xxx.send(image.url)

因为nonebot下各适配器对 Reply 元素的处理方式各不相同,同时nonebot既没有约定统一的获取不经过check_tome等的原始消息的接口,也没有统一如MessageEvent.reply的格式,导致此次更新对于获取Reply的内容是毫无帮助的

Full Changelog: v0.13.0...v0.14.0