Skip to content

Nonebot Plugin Alconna 0.10.0

Compare
Choose a tag to compare
@RF-Tar-Railt RF-Tar-Railt released this 23 Jul 10:44
· 506 commits to master since this release

变更

  • on_alconna 现在返回的是 Matcher 子类 AlconnaMatcher
  • AlconnaMatcher 增加了方法 @assign, 作为 @handle([Check(assign(...))]) 的快捷写法:
    from nonebot_plugin_alconna import on_alconna
    
    cmd = on_alconna(...)
    @cmd.assign("foo.bar")
    async def handle_foo_bar(...):
        ...
    其等同于
    from nonebot_plugin_alconna import on_alconna, Check, assign
    
    cmd = on_alconna(...)
    @cmd.handle([Check(assign("foo.bar"))])
    async def handle_foo_bar(...):
        ...

Full Changelog: v0.9.3...v0.10.0