We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
当给 option 设置了 fallback 后,alias 中的 config.options 无效
ctx .command('cmd <cmd:string>') .option('region', '-r <region:string>', { fallback: 'cn' }) .alias('tcmd', { options: { region: 'tw' } }) .alias('rcmd', { options: { region: 'jp' } }) .action(async ({ session, options }, cmd) => { ctx.logger.info(cmd) ctx.logger.info(options) })
message: [ '#cmd 123' ] cmd: 123 option: { region: 'cn' } message: [ '#tcmd123' ] cmd: 123 option: { region: 'cn' } message: [ '#rcmd 123' ] cmd: 123 option: { region: 'cn' }
region 应该与 alias 中传入的一致
No response
System: OS: Windows 10 10.0.19045 CPU: (8) x64 Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
Binaries: Node: 22.5.1 Yarn: 4.1.1
Koishi: Core: 4.17.10 Console: 5.29.3
The text was updated successfully, but these errors were encountered:
62332c3
Currently the pre-defined args of aliases is broken by the fix.
args
koishi/packages/core/src/command/index.ts
Lines 316 to 317 in 2e7e3e5
koishi/packages/core/src/command/parser.ts
Line 376 in 2e7e3e5
[...argv.args]
Sorry, something went wrong.
29e8470
No branches or pull requests
Describe the bug
当给 option 设置了 fallback 后,alias 中的 config.options 无效
Steps to reproduce
Expected behavior
region 应该与 alias 中传入的一致
Screenshots
No response
Versions
System:
OS: Windows 10 10.0.19045
CPU: (8) x64 Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
Binaries:
Node: 22.5.1
Yarn: 4.1.1
Koishi:
Core: 4.17.10
Console: 5.29.3
Additional context
No response
The text was updated successfully, but these errors were encountered: