diff --git a/coolq/cqcode.go b/coolq/cqcode.go index ddb8119..ec01798 100644 --- a/coolq/cqcode.go +++ b/coolq/cqcode.go @@ -51,9 +51,13 @@ func ToArrayMessage(e []message.IMessageElement, code int64, raw ...bool) (r []M "data": map[string]string{"text": o.Content}, } case *message.LightAppElement: + //m = MSG{ + // "type": "text", + // "data": map[string]string{"text": o.Content}, + //} m = MSG{ - "type": "text", - "data": map[string]string{"text": o.Content}, + "type": "json", + "data": map[string]string{"data": o.Content}, } case *message.AtElement: if o.Target == 0 { @@ -113,6 +117,18 @@ func ToArrayMessage(e []message.IMessageElement, code int64, raw ...bool) (r []M "data": map[string]string{"file": o.Filename, "url": o.Url}, } } + case *message.ServiceElement: + if isOk := strings.Contains(o.Content, "