Skip to content
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

Feature: 应令 true 成为指令配置中 checkArgCount 的缺省值。 #764

Open
BH4HPA opened this issue Jul 27, 2022 · 0 comments
Open
Labels

Comments

@BH4HPA
Copy link

BH4HPA commented Jul 27, 2022

Describe the problem related to the feature request

根据文档,定义的指令可以选用带有用尖括号包裹的必选参数,但 koishi 默认并不会对必选参数是否为空进行检测,这并不好。
翻阅文档,这正是因为指令配置中 checkArgCount 的缺省值为 false 造成的。
窃以为,可选参数才是进阶编程的操作,koishi 应当默认对必选的空参进行强检测,减少开发者的代码量。

Describe the solution you'd like

如题,应令 true 成为指令配置中 checkArgCount 的缺省值。

Describe alternatives you've considered

其他方法均需增加开发者的代码量,如对 checkArgCount 进行赋值,对空参数进行检测等..

Additional context

null

@BH4HPA BH4HPA added the feature 新特性 label Jul 27, 2022
@BH4HPA BH4HPA changed the title Feature: 应令指令 true 成为指令配置中 checkArgCount 的缺省值。 Feature: 应令 true 成为指令配置中 checkArgCount 的缺省值。 Jul 27, 2022
@BH4HPA BH4HPA mentioned this issue Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants