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
h.i18n
h.i18n 在离开 command scope 时如果使用缩写会报 Missing scope 错误。
Missing scope
ctx.command('foo').action(async ({ session }) => { // 不报错 await session.send(h.i18n('.info')) // 不报错 return session.text('.success') }) ctx.command('bar').action(async ({ session }) => { // 不报错 await session.send(session.text('.info')) // 报错 return h.i18n('.success') })
经过分析,在离开 command scope 之后使用缩写 koishi 会找不到是哪个 command 发出的元素,故而报 Missing scope 错误。
如果在消息元素离开函数作用域的时候将 i18n 进行 transform,这样 koishi 就可以知道是哪个 command scope 了,然后进行 transform,避免之后出现 Missing scope 错误。
No response
The text was updated successfully, but these errors were encountered:
3e87185
No branches or pull requests
Describe the problem related to the feature request
h.i18n
在离开 command scope 时如果使用缩写会报Missing scope
错误。经过分析,在离开 command scope 之后使用缩写 koishi 会找不到是哪个 command 发出的元素,故而报
Missing scope
错误。Describe the solution you'd like
如果在消息元素离开函数作用域的时候将 i18n 进行 transform,这样 koishi 就可以知道是哪个 command scope 了,然后进行 transform,避免之后出现
Missing scope
错误。Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: