diff --git a/go.mod b/go.mod index 0bf68ec6..2006d99e 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,6 @@ go 1.14 require ( github.com/golang/protobuf v1.4.2 + github.com/tidwall/gjson v1.6.1 // indirect google.golang.org/protobuf v1.25.0 ) diff --git a/message/message.go b/message/message.go index e120a9ab..0362f569 100644 --- a/message/message.go +++ b/message/message.go @@ -6,6 +6,7 @@ import ( "github.com/Mrs4s/MiraiGo/client/pb/msg" "github.com/Mrs4s/MiraiGo/utils" "github.com/golang/protobuf/proto" + "github.com/tidwall/gjson" "math" "reflect" "regexp" @@ -502,6 +503,15 @@ func ParseMessageElems(elems []*msg.Elem) []IMessageElement { if elem.RichMsg.ServiceId == 33 { continue // 前面一个 elem 已经解析到链接 } + if isOk := strings.Contains(content, "