|
|
|
@@ -40,6 +40,7 @@ type ReplyContent struct { |
|
|
|
MusicUrl string |
|
|
|
HQMusicUrl string |
|
|
|
ThumbMediaId string |
|
|
|
Articles []ArticlesContent |
|
|
|
} |
|
|
|
|
|
|
|
func GetAutomaticReply(msg string) *AutomaticResponseContent { |
|
|
|
@@ -51,13 +52,13 @@ func GetAutomaticReply(msg string) *AutomaticResponseContent { |
|
|
|
return nil |
|
|
|
} |
|
|
|
for i := 0; i < len(r); i++ { |
|
|
|
if r[i].IsFullMatch > 0 { |
|
|
|
if r[i].IsFullMatch == 0 { |
|
|
|
for _, v := range r[i].KeyWords { |
|
|
|
if strings.Contains(msg, v) { |
|
|
|
return r[i] |
|
|
|
} |
|
|
|
} |
|
|
|
} else if r[i].IsFullMatch == 0 { |
|
|
|
} else if r[i].IsFullMatch > 0 { |
|
|
|
for _, v := range r[i].KeyWords { |
|
|
|
if msg == v { |
|
|
|
return r[i] |
|
|
|
|