mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
✏️ 解决hs cache问题
This commit is contained in:
parent
c3e0520aec
commit
3faec79371
@ -48,11 +48,11 @@ func init() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var sk message.Message
|
var sk message.Message
|
||||||
var imgcq string
|
|
||||||
var data []byte
|
var data []byte
|
||||||
for i := 0; i < t && i < 5; i++ {
|
for i := 0; i < t && i < 5; i++ {
|
||||||
cid := gjson.Get(g, `list.`+strconv.Itoa(i)+`.CardID`).String()
|
cid := gjson.Get(g, `list.`+strconv.Itoa(i)+`.CardID`).String()
|
||||||
cachefile := cachedir + cid
|
cachefile := cachedir + cid
|
||||||
|
imgcq := `[CQ:image,file=` + "file:///" + cachefile + `]`
|
||||||
if _, err := os.Stat(cachefile); err != nil {
|
if _, err := os.Stat(cachefile); err != nil {
|
||||||
im, err := req.Get(`https://res.fbigame.com/hs/v13/`+cid+
|
im, err := req.Get(`https://res.fbigame.com/hs/v13/`+cid+
|
||||||
`.png?auth_key=`+gjson.Get(g, `list.`+strconv.Itoa(i)+`.auth_key`).String(),
|
`.png?auth_key=`+gjson.Get(g, `list.`+strconv.Itoa(i)+`.auth_key`).String(),
|
||||||
@ -69,8 +69,6 @@ func init() {
|
|||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
imgcq = err.Error()
|
imgcq = err.Error()
|
||||||
} else {
|
|
||||||
imgcq = `[CQ:image,file=` + "file:///" + cachefile + `]`
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sk = append(
|
sk = append(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user