koishi
koishi copied to clipboard
Bug: 指令的权限判断应当优先于指令解析的反馈
Describe the bug
例如有指令
ctx.command('foo', { authority: 3 }).option('ver', '-v <ver:number>')
当权限不足时,foo
报权限不足
,而foo -v abcd
则会报 选项ver输入无效
是否应该将部分逻辑移至on('attach')
? 或者延后parse reject
的时机
ref: koishijs/koishi-plugin-switch#3
Steps to reproduce
/
Expected behavior
二者均应报权限不足
Screenshots
No response
Versions
- OS:
- Platform:
- Node version:
- Koishi version:
Additional context
No response