From ede3c11dbfdbf119a3be9e3898ca8301a4986b63 Mon Sep 17 00:00:00 2001 From: ZJY <764763903@qq.com> Date: Wed, 29 Sep 2021 15:54:03 +0800 Subject: [PATCH] =?UTF-8?q?add=20QQ=E6=89=AB=E7=A0=81=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qbot/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qbot/main.go b/qbot/main.go index 07cacd8..fbb9ff0 100644 --- a/qbot/main.go +++ b/qbot/main.go @@ -79,8 +79,9 @@ func Main() { if strings.Contains(msg.(string), "data:image") { photo := msg.(string) logs.Info(photo) - b := []byte(photo) - bot.SendPrivateMessage(uid, models.Config.QQGroupID, &message.SendingMessage{Elements: []message.IMessageElement{&coolq.LocalImageElement{Stream: bytes.NewReader(b)}}}) + //b := []byte(photo) + //log.Error(b) + bot.SendPrivateMessage(uid, models.Config.QQGroupID, &message.SendingMessage{Elements: []message.IMessageElement{&coolq.LocalImageElement{File: "./output.jpg"}}}) } else { bot.SendPrivateMessage(uid, models.Config.QQGroupID, &message.SendingMessage{Elements: []message.IMessageElement{&message.TextElement{Content: msg.(string)}}}) }