From d3eb0f9112e92a6d2153e2215b2457ae2af1b7fe Mon Sep 17 00:00:00 2001 From: hutiance Date: Fri, 27 Dec 2024 15:10:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86b=E7=AB=99=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=8D=A1=E7=89=87=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/bilibili/card2msg.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugin/bilibili/card2msg.go b/plugin/bilibili/card2msg.go index 3127aeb2c9..3e6c59918e 100644 --- a/plugin/bilibili/card2msg.go +++ b/plugin/bilibili/card2msg.go @@ -306,16 +306,18 @@ func videoCard2msg(card bz.Card) (msg []message.Segment, err error) { var mCard bz.MemberCard msg = make([]message.Segment, 0, 16) mCard, err = bz.GetMemberCard(card.Owner.Mid) - if err != nil { - return - } msg = append(msg, message.Text("标题: ", card.Title, "\n")) if card.Rights.IsCooperation == 1 { for i := 0; i < len(card.Staff); i++ { msg = append(msg, message.Text(card.Staff[i].Title, ": ", card.Staff[i].Name, " 粉丝: ", bz.HumanNum(card.Staff[i].Follower), "\n")) } } else { - msg = append(msg, message.Text("UP主: ", card.Owner.Name, " 粉丝: ", bz.HumanNum(mCard.Fans), "\n")) + if err != nil { + err = nil + msg = append(msg, message.Text("UP主: ", card.Owner.Name, "\n")) + } else { + msg = append(msg, message.Text("UP主: ", card.Owner.Name, " 粉丝: ", bz.HumanNum(mCard.Fans), "\n")) + } } msg = append(msg, message.Text("播放: ", bz.HumanNum(card.Stat.View), " 弹幕: ", bz.HumanNum(card.Stat.Danmaku))) msg = append(msg, message.Image(card.Pic))