-
-
Notifications
You must be signed in to change notification settings - Fork 256
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: 将指令视为服务 #1282
Comments
个人建议:
这样也能实现上述需求,并且统一性更强。
|
我是笨蛋 Generated by koishi-plugin-github. |
当前版本中,尽管存在冲突指令时会报错,但是 Koishi 仍然能正常启动,只是其中一个插件启动失败而已。失败的插件仍然会产生可读的日志信息,因此实际上问题并不严重。 将指令视为服务是一个很好的思路,它可以明确表达插件对指令的依赖关系,并规避潜在的冲突。然而,某些插件提供了大量指令。如果直接要求所有插件都声明自己提供的指令,我担心会增加开发者负担。如果此行为是非强制性的,那么开发者恐怕并不会调整自己的插件,因此上述问题依然存在;如果是强制性的(即使只是给出警告),已经不再活跃更新的旧插件一经启动就会产生大量错误信息,这并不是我们希望看到的。 |
让两个指令都能用就好了(
|
指令调用要提供给其他插件作为 API 调用,所以必然不能这么设计。否则插件可能会在没人说话的时候来一句请选择了。 |
除非是预装插件,不然没办法保证这个指令被实现/用法一样 |
由服务的提供者规定服务的行为,由服务的使用者决定使用谁的服务。本身这就不是强制的。指令同理。 |
Describe the problem related to the feature request
不同插件提供了同一个命令在启动时 koishi 会直接报错
Describe the solution you'd like
类似服务重复提供提示,为指令提供冲突提示
Describe alternatives you've considered
Additional context
No response
The text was updated successfully, but these errors were encountered: