koishijs / koishi

Cross-platform chatbot framework made with love
https://koishi.chat
MIT License
4.53k stars 246 forks source link

Bug: cmd.option不能重载中文选项 #1424

Closed XNORIGC closed 4 months ago

XNORIGC commented 4 months ago

Describe the bug

在文档指令开发#选项的重载中有写可以用参数对选项进行重载,但若使用中文参数则会报错

Steps to reproduce

示例:

ctx.command('b')
  .option('a', '-a <a>')
  .option('a', '--b', { value: 0 })
ctx.command('乙')
  .option('a', '-a <a>')
  .option('a', '--乙', { value: 0 })

Expected behavior

两条示例命令均应该能够通过运行

Screenshots

image

Versions

Additional context

No response

shigma commented 4 months ago

已修复,下个版本实装。