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