You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So you could see here we block an invoke of the command using the command/execute event, which is triggered before executing the cmd.action(callback) part. That's why the validations or hooks still running even we disable it with the switch command.
But I don't know if there is an event that triggered AFTER parsing a command. (Because if you register a middleware BEFORE the parsing part, you could only parse the messages by yourself, generally we don't want to make a plugin complicated and unmaintainable.)
Describe the bug
使用 switch 禁用一个插件后,如果该插件有介于
apply()
和ctx.command()
之间的逻辑,仍会在匹配到 command 关键词时被执行。例如 novelai-bot 会在定义命令范围外进行参数检查,使用 switch novelai 禁用此插件后输入不合法的分辨率仍会报错。Steps to reproduce
Expected behavior
当插件的所有已注册指令都被禁用时,不应该触发该插件其余逻辑;
或当一个已注册指令被禁用时,不应该在发现被禁用指令关键词时调用该插件。
Screenshots
Versions
Additional context
No response
The text was updated successfully, but these errors were encountered: