fix: route help and repeated-slash settings locally
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user