fix command perfix
This commit is contained in:
parent
7564b5849c
commit
f8deff3b37
@ -1,7 +1,6 @@
|
||||
package msgcmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@ -35,10 +34,15 @@ func ParseLineMsg(txt, replyToken string, source *lineobj.SourceObject) {
|
||||
}
|
||||
|
||||
firstNum := []rune(strs[0])[0]
|
||||
fmt.Println("Char :: ", strs[0][0], " Number :: ", firstNum)
|
||||
|
||||
if firstNum == 33 || firstNum == 65281 {
|
||||
// nor cmd
|
||||
cmd := strs[0][1:]
|
||||
cmd := ""
|
||||
if firstNum == 65281 {
|
||||
cmd = strs[0][3:]
|
||||
} else {
|
||||
cmd = strs[0][1:]
|
||||
}
|
||||
if len(cmd) == 0 {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user