add command prefix check

This commit is contained in:
Jay
2018-10-10 00:52:40 +08:00
parent 63a6856e45
commit 8e1b0c1ef6
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -33,7 +33,8 @@ func ParseLineMsg(txt, replyToken string, source *lineobj.SourceObject) {
return
}
if strings.HasPrefix(strs[0], "!") || strings.HasPrefix(strs[0], "") {
firstNum := []rune(strs[0])[0]
if firstNum == 33 || firstNum == 65281 {
// nor cmd
cmd := strs[0][1:]
if len(cmd) == 0 {