Feature: 添加一个上下文的api,能够实现禁用插件 启用插件的功能 #1019
Replies: 27 comments
-
I think we can modify the assignee to implement this function without any new feature |
Beta Was this translation helpful? Give feedback.
-
Refered from koishi docs:
I think you can add bots once. When any bot was unavailable,you can change it at If you did not need automazion , you can also use the asignee command. The document for asignee command: |
Beta Was this translation helpful? Give feedback.
-
satorijs/satori@a3b09a4
satorijs/satori@a3b09a4 |
Beta Was this translation helpful? Give feedback.
-
这个不是命令的方式吧?是通过 API 调用的方式? |
Beta Was this translation helpful? Give feedback.
-
这个功能其实很有用,因为频道里面一般会有专门的机器人频道,所以需要控制哪些命令在哪些频道能响应。不知道有插件可以实现吗?另外,这种功能我觉得更像是官方功能。 |
Beta Was this translation helpful? Give feedback.
-
确实 当时开 issue 的时候不了解专业术语( 所以这个有无必要 我看到 TimeBather 提及了
但我无法判断是否风控 |
Beta Was this translation helpful? Give feedback.
-
assignee 功能或许符合你的需求 |
Beta Was this translation helpful? Give feedback.
-
请问这是个插件吗 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
这个assging是不是全部命令都不响应 |
Beta Was this translation helpful? Give feedback.
-
Non, the 不,当你在同一个公会中有多个机器人时, |
Beta Was this translation helpful? Give feedback.
-
As you could invoke 正如你可以 调用 |
Beta Was this translation helpful? Give feedback.
-
请问如果我想让一个插件里面的若干指令只在某频道响应,怎么做比较好 |
Beta Was this translation helpful? Give feedback.
-
是说其他指令不受影响吗?能说说具体的使用例吗? |
Beta Was this translation helpful? Give feedback.
-
我推荐不在插件侧编写任何额外的代码,通过过滤器配置来实现。 |
Beta Was this translation helpful? Give feedback.
-
目前过滤器是针对整个插件是否响应,不太符合我的需要 |
Beta Was this translation helpful? Give feedback.
-
那么为什么不发两个插件呢? |
Beta Was this translation helpful? Give feedback.
-
我认为对用户来说,只要存在这种细粒度的控制,发两个插件就一定是更好的。如果有数据通信还可以发第三个插件,提供一个服务。 |
Beta Was this translation helpful? Give feedback.
-
也不是不行,只是这10个功能都是同一个主题,互相辅助的功能,如果有用户只装了其中一个可能会有点问题 |
Beta Was this translation helpful? Give feedback.
-
之后可能会出一种叫过滤器配置项的东西,允许插件将过滤器作为配置项的一部分,这样你可以用两个配置项实现两个过滤器,然后在插件内部去通过过滤器控制不同指令的行为。不过估计还需要一段时间才会出。 毕竟我没有看过你的代码,很难给出最贴合实际需求的解决方案。对我来说,过滤器配置项和发多个插件各有适用的场景。 |
Beta Was this translation helpful? Give feedback.
-
我认为你们可以自己建一栋摩天大楼了, 已经和标题没啥关系了(雾 |
Beta Was this translation helpful? Give feedback.
-
没关系,不急,这个功能我感觉不只是编程上的需要,估计普通用户也会有这个需求,可以考虑一下扩展过滤器。 |
Beta Was this translation helpful? Give feedback.
-
回归主题。这个 issue 本身的需求我认为可以分为两个部分:
个人认为 assignee 切换是一个很有意义的功能,值得专门写一个插件,实现一个 bot 管理池。不仅可以监控风控事件,还可以设计定时切换逻辑。如果觉得此方案可行的话,可以转去 gocqhttp 插件提交 1 相关的 feature request。 |
Beta Was this translation helpful? Give feedback.
-
我觉得过滤器上增加一列command选项应该就可以解决,这样普通用户也能用 |
Beta Was this translation helpful? Give feedback.
-
这是因为对 Koishi 的改动必须非常谨慎,能写插件的就不应该去改 Koishi。 |
Beta Was this translation helpful? Give feedback.
-
我觉得这个 issue 已经可以转 discussion 了。这个 issue 涉及的 X 需求可以单独通过插件来实现。 |
Beta Was this translation helpful? Give feedback.
-
这原本的这段伪代码的方案我能实现( |
Beta Was this translation helpful? Give feedback.
-
Describe the problem related to the feature request
号不少 风控的也不少 我想要在一个号风控后通过命令的方式禁用掉当前的onebot插件 然后打开下一个onebot
Describe the solution you'd like
添加一个上下文的api,能够实现禁用插件 启用插件的功能(可在插件配置向用户申请该权
Describe alternatives you've considered
让koishi自动检测gocqhttp的stdout 来实现风控换号?
Additional context
来个伪代码实现
Beta Was this translation helpful? Give feedback.
All reactions