Skip to content

Nonebot Plugin Alconna 0.16.0

Compare
Choose a tag to compare
@RF-Tar-Railt RF-Tar-Railt released this 15 Aug 08:56
· 447 commits to master since this release

变更

  • 增加 Command 便捷命令创建器:
     book = (
         Command("book", "测试")
         .option("writer", "-w <id:int>")
         .option("writer", "--anonymous", {"id": 0})
         .usage("book [-w <id:int> | --anonymous]")
         .shortcut("测试", {"args": ["--anonymous"]})
         .build()
     )
     
     
     @book.handle()
     async def test1_h(arp: Arparma = AlconnaMatches()):
         await book.send(str(arp.options))

Full Changelog: v0.15.0...v0.16.0