mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
fix: []message.MessageSegment->message.Message (#429)
This commit is contained in:
parent
145a9fb0b1
commit
97fea6a93a
@ -139,7 +139,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
msg := make([]message.MessageSegment, n)
|
msg := make(message.Message, n)
|
||||||
randomIntMap := make(map[int]int, 30)
|
randomIntMap := make(map[int]int, 30)
|
||||||
for i := range msg {
|
for i := range msg {
|
||||||
j := rand.Intn(length)
|
j := rand.Intn(length)
|
||||||
@ -156,7 +156,7 @@ func init() {
|
|||||||
if p == 1 {
|
if p == 1 {
|
||||||
description = card.ReverseDescription
|
description = card.ReverseDescription
|
||||||
}
|
}
|
||||||
tarotMsg := []message.MessageSegment{
|
tarotMsg := message.Message{
|
||||||
message.Text(position[p], "的『", name, "』\n"),
|
message.Text(position[p], "的『", name, "』\n"),
|
||||||
message.Image(bed + reverse[p] + card.ImgURL),
|
message.Image(bed + reverse[p] + card.ImgURL),
|
||||||
message.Text("\n其释义为: ", description)}
|
message.Text("\n其释义为: ", description)}
|
||||||
@ -213,7 +213,7 @@ func init() {
|
|||||||
build.WriteString("---")
|
build.WriteString("---")
|
||||||
build.WriteString(match)
|
build.WriteString(match)
|
||||||
build.WriteString("\n")
|
build.WriteString("\n")
|
||||||
msg := make([]message.MessageSegment, info.CardsNum+1)
|
msg := make(message.Message, info.CardsNum+1)
|
||||||
randomIntMap := make(map[int]int, 30)
|
randomIntMap := make(map[int]int, 30)
|
||||||
for i := 0; i < info.CardsNum; i++ {
|
for i := 0; i < info.CardsNum; i++ {
|
||||||
j := rand.Intn(length)
|
j := rand.Intn(length)
|
||||||
@ -230,7 +230,7 @@ func init() {
|
|||||||
if p == 1 {
|
if p == 1 {
|
||||||
description = card.ReverseDescription
|
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(info.Represent[0][i])
|
||||||
build.WriteString(":")
|
build.WriteString(":")
|
||||||
build.WriteString(position[p])
|
build.WriteString(position[p])
|
||||||
@ -247,7 +247,7 @@ func init() {
|
|||||||
ctx.SendChain(message.Text("ERROR: ", err))
|
ctx.SendChain(message.Text("ERROR: ", err))
|
||||||
return
|
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)
|
ctx.Send(msg)
|
||||||
} else {
|
} else {
|
||||||
ctx.SendChain(message.Text("没有找到", match, "噢~\n现有牌阵列表: \n", strings.Join(formationName, "\n")))
|
ctx.SendChain(message.Text("没有找到", match, "噢~\n现有牌阵列表: \n", strings.Join(formationName, "\n")))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user