From ac5803a539c07f94fea3fb3e17016cf265bbd995 Mon Sep 17 00:00:00 2001 From: scjtqs Date: Sun, 6 Sep 2020 10:39:46 +0800 Subject: [PATCH] =?UTF-8?q?xml=E5=92=8Cjson=E6=B6=88=E6=81=AF=E4=BB=A5?= =?UTF-8?q?=E5=8F=8Acq=E7=A0=81=E4=B8=8A=E6=8A=A5=E6=94=AF=E6=8C=81.=20?= =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E7=9A=84xml=E5=92=8Cjson=E7=9A=84?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E8=AF=86=E5=88=AB=EF=BC=8C=E4=BE=9D=E8=B5=96?= =?UTF-8?q?miraigo=E7=9A=84pr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coolq/cqcode.go | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) 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, "