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
+4 -1
View File
@@ -53,9 +53,12 @@ func ParseCommand(raw string) (Command, bool) {
if len(fields) == 0 {
return Command{}, false
}
if strings.HasPrefix(fields[0], "//") {
fields[0] = "/" + strings.TrimLeft(fields[0], "/")
}
name := strings.ToLower(fields[0])
switch name {
case "/setting", "/settings", "/设置":
case "/setting", "/settings", "/设置", "/help":
default:
return Command{}, false
}