修复cq码回复

This commit is contained in:
liyp 2024-04-14 20:40:55 +08:00
parent 5211d1d8c6
commit 070738fd9d

View file

@ -44,14 +44,14 @@ func (a *Hhsh) GetMsg() string {
return err.Error()
}
resultSlipe := data["data"].([]interface{})
fmt.Println("resultSlipe:", resultSlipe)
// fmt.Println("resultSlipe:", resultSlipe)
if trans, ok := resultSlipe[0].(map[string]interface{})["trans"]; ok {
// println("trans:", trans.([]interface{}))
transSlice := trans.([]interface{})
msg := "[CQ:reply,id={" + a.MID + "}]("
msg := "[CQ:reply,id=" + a.MID + "]("
for _, item := range transSlice {
// fmt.Print(item, " ")
msg += item.(string) + ""
msg += item.(string) + " "
}
return msg + ")"
}