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
注册一个指令,使用变长参数时,定义预期的类型,koishi只会转换第一个元素的类型,而保持剩下的不变(仍为 string),这会导致非预期的行为。
ctx .command('test [...rest:number]') .action(({ session }, ...rest) => { console.log(rest); });
变长参数禁止定义预期的类型,或者转换所有元素的类型。
No response
The text was updated successfully, but these errors were encountered:
感谢反馈。我们尽快修复。
Sorry, something went wrong.
f793cdd
已修复此问题,将在下个版本实装修复。
No branches or pull requests
Describe the bug
注册一个指令,使用变长参数时,定义预期的类型,koishi只会转换第一个元素的类型,而保持剩下的不变(仍为 string),这会导致非预期的行为。
Steps to reproduce
Expected behavior
变长参数禁止定义预期的类型,或者转换所有元素的类型。
Screenshots
Versions
Additional context
No response
The text was updated successfully, but these errors were encountered: