fix: route help and repeated-slash settings locally

This commit is contained in:
姚章浩
2026-08-13 14:39:56 +08:00
parent 44d9398c78
commit 0f30f8cec8
4 changed files with 25 additions and 2 deletions
+3
View File
@@ -76,6 +76,9 @@ func (c *Controller) Handle(ctx context.Context, in SettingInput) (string, error
action = s.PendingAction
args = []string{action, strings.TrimSpace(in.Text)}
}
if explicit && cmd.Name == "/help" {
return "📖 使用帮助:\n• 直接发送问题:普通提问\n• /setting:查看个人设置\n• /setting language <auto|zh-CN|en|ja|ko|es>:设置回答语言\n• /help:查看本帮助", nil
}
if explicit && len(args) == 1 && len(args[0]) == 6 && allDigits(args[0]) {
if strings.TrimSpace(in.ConversationType) != "direct" {
return "管理员绑定码只能私聊机器人使用。", nil