mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-07-13 00:43:48 +00:00
fix light app.
This commit is contained in:
@ -51,6 +51,11 @@ func ToArrayMessage(e []message.IMessageElement, code int64, raw ...bool) (r []M
|
|||||||
"type": "text",
|
"type": "text",
|
||||||
"data": map[string]string{"text": o.Content},
|
"data": map[string]string{"text": o.Content},
|
||||||
}
|
}
|
||||||
|
case *message.LightAppElement:
|
||||||
|
m = MSG{
|
||||||
|
"type": "text",
|
||||||
|
"data": map[string]string{"text": o.Content},
|
||||||
|
}
|
||||||
case *message.AtElement:
|
case *message.AtElement:
|
||||||
if o.Target == 0 {
|
if o.Target == 0 {
|
||||||
m = MSG{
|
m = MSG{
|
||||||
@ -161,6 +166,8 @@ func ToStringMessage(e []message.IMessageElement, code int64, raw ...bool) (r st
|
|||||||
} else {
|
} else {
|
||||||
r += fmt.Sprintf(`[CQ:image,file=%s,url=%s]`, o.Filename, CQCodeEscapeValue(o.Url))
|
r += fmt.Sprintf(`[CQ:image,file=%s,url=%s]`, o.Filename, CQCodeEscapeValue(o.Url))
|
||||||
}
|
}
|
||||||
|
case *message.LightAppElement:
|
||||||
|
r += CQCodeEscapeText(o.Content)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user