Skip to content

Commit 97fea6a

Browse files
authored
fix: []message.MessageSegment->message.Message (#429)
1 parent 145a9fb commit 97fea6a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

plugin/tarot/tarot.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func init() {
139139
}
140140
return
141141
}
142-
msg := make([]message.MessageSegment, n)
142+
msg := make(message.Message, n)
143143
randomIntMap := make(map[int]int, 30)
144144
for i := range msg {
145145
j := rand.Intn(length)
@@ -156,7 +156,7 @@ func init() {
156156
if p == 1 {
157157
description = card.ReverseDescription
158158
}
159-
tarotMsg := []message.MessageSegment{
159+
tarotMsg := message.Message{
160160
message.Text(position[p], "的『", name, "』\n"),
161161
message.Image(bed + reverse[p] + card.ImgURL),
162162
message.Text("\n其释义为: ", description)}
@@ -213,7 +213,7 @@ func init() {
213213
build.WriteString("---")
214214
build.WriteString(match)
215215
build.WriteString("\n")
216-
msg := make([]message.MessageSegment, info.CardsNum+1)
216+
msg := make(message.Message, info.CardsNum+1)
217217
randomIntMap := make(map[int]int, 30)
218218
for i := 0; i < info.CardsNum; i++ {
219219
j := rand.Intn(length)
@@ -230,7 +230,7 @@ func init() {
230230
if p == 1 {
231231
description = card.ReverseDescription
232232
}
233-
tarotMsg := []message.MessageSegment{message.Image(bed + reverse[p] + card.ImgURL)}
233+
tarotMsg := message.Message{message.Image(bed + reverse[p] + card.ImgURL)}
234234
build.WriteString(info.Represent[0][i])
235235
build.WriteString(":")
236236
build.WriteString(position[p])
@@ -247,7 +247,7 @@ func init() {
247247
ctx.SendChain(message.Text("ERROR: ", err))
248248
return
249249
}
250-
msg[info.CardsNum] = ctxext.FakeSenderForwardNode(ctx, []message.MessageSegment{message.Image("base64://" + binary.BytesToString(formation))}...)
250+
msg[info.CardsNum] = ctxext.FakeSenderForwardNode(ctx, message.Message{message.Image("base64://" + binary.BytesToString(formation))}...)
251251
ctx.Send(msg)
252252
} else {
253253
ctx.SendChain(message.Text("没有找到", match, "噢~\n现有牌阵列表: \n", strings.Join(formationName, "\n")))

0 commit comments

Comments
 (0)