From 97fea6a93adcece619baf6592f2ba48b36eeb0ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=AB=E6=80=9D=E6=BD=8B?= <55676105+shudorcl@users.noreply.github.com> Date: Mon, 3 Oct 2022 19:54:39 +0800 Subject: [PATCH] fix: []message.MessageSegment->message.Message (#429) --- plugin/tarot/tarot.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugin/tarot/tarot.go b/plugin/tarot/tarot.go index 488ba05b..fd5af57f 100644 --- a/plugin/tarot/tarot.go +++ b/plugin/tarot/tarot.go @@ -139,7 +139,7 @@ func init() { } return } - msg := make([]message.MessageSegment, n) + msg := make(message.Message, n) randomIntMap := make(map[int]int, 30) for i := range msg { j := rand.Intn(length) @@ -156,7 +156,7 @@ func init() { if p == 1 { description = card.ReverseDescription } - tarotMsg := []message.MessageSegment{ + tarotMsg := message.Message{ message.Text(position[p], "的『", name, "』\n"), message.Image(bed + reverse[p] + card.ImgURL), message.Text("\n其释义为: ", description)} @@ -213,7 +213,7 @@ func init() { build.WriteString("---") build.WriteString(match) build.WriteString("\n") - msg := make([]message.MessageSegment, info.CardsNum+1) + msg := make(message.Message, info.CardsNum+1) randomIntMap := make(map[int]int, 30) for i := 0; i < info.CardsNum; i++ { j := rand.Intn(length) @@ -230,7 +230,7 @@ func init() { if p == 1 { description = card.ReverseDescription } - tarotMsg := []message.MessageSegment{message.Image(bed + reverse[p] + card.ImgURL)} + tarotMsg := message.Message{message.Image(bed + reverse[p] + card.ImgURL)} build.WriteString(info.Represent[0][i]) build.WriteString(":") build.WriteString(position[p]) @@ -247,7 +247,7 @@ func init() { ctx.SendChain(message.Text("ERROR: ", err)) return } - msg[info.CardsNum] = ctxext.FakeSenderForwardNode(ctx, []message.MessageSegment{message.Image("base64://" + binary.BytesToString(formation))}...) + msg[info.CardsNum] = ctxext.FakeSenderForwardNode(ctx, message.Message{message.Image("base64://" + binary.BytesToString(formation))}...) ctx.Send(msg) } else { ctx.SendChain(message.Text("没有找到", match, "噢~\n现有牌阵列表: \n", strings.Join(formationName, "\n")))