-
-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
自动重定向至子指令后选项无法自动赋值 #540
Labels
Milestone
Comments
发现了另一个问题( 定义alpha和beta两个选项
这时不使用自动重定向(
使用自动重定向(
|
嗯确实是需要解决的 Bug。 |
Anillc
added a commit
to Anillc/koishi
that referenced
this issue
May 1, 2022
Anillc
added a commit
to Anillc/koishi
that referenced
this issue
May 1, 2022
Anillc
added a commit
to Anillc/koishi
that referenced
this issue
May 1, 2022
Anillc
added a commit
to Anillc/koishi
that referenced
this issue
May 2, 2022
Anillc
added a commit
to Anillc/koishi
that referenced
this issue
May 2, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
首先十分感谢采纳之前在 #476 的建议!
但出现了新的问题,即定义选项后,无法自动根据缩写给选项变量赋值
如文档中所说,使用
.option('-a', 'alpha')
定义选项后,应该在使用-a
选项时,自动为options.alpha
赋值但在调用指令
/cmd subcmd -a
时发现并没有为alpha
赋值,反而是直接赋给了a
而在父子指令中加上
.
(/cmd.subcmd -a
)后又恢复正常,为options.alpha
赋上了true
Steps to reproduce
定义父指令
cmd
并添加子指令subcmd
,然后为subcmd
添加选项('alpha', '-a')
分别使用
cmd subcmd -a
和cmd.subcmd -a
进行测试Expected behavior
重定向至子指令时自动根据缩写给选项变量赋值
Screenshots
No response
Versions
Additional context
No response
The text was updated successfully, but these errors were encountered: