diff --git a/.gitignore b/.gitignore index 74eeb37..2666aab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ data.db test.json -config.toml \ No newline at end of file +config.toml +*.exe \ No newline at end of file diff --git a/workers/lsp.go b/workers/lsp.go index c3c1e0c..0255b5b 100644 --- a/workers/lsp.go +++ b/workers/lsp.go @@ -15,7 +15,7 @@ type Lsp struct { func (a *Lsp) GetMsg() string { a.AllowGroup = []string{"313047773"} - url := "https://api.lolicon.app/setu/v2?size=mini&r18=0" + url := "https://api.lolicon.app/setu/v2?r18=0&size=small" resp, err := http.Get(url) if err != nil { return "获取失败" @@ -34,11 +34,11 @@ func (a *Lsp) GetMsg() string { data := res["data"].([]interface{}) uid := data[0].(map[string]interface{})["uid"].(float64) urls := data[0].(map[string]interface{})["urls"].(map[string]interface{}) - imgUrl := urls["mini"].(string) + imgUrl := urls["small"].(string) // title := data[0].(map[string]interface{})["title"].(string) // println("标题:" + title + "\n" + imgUrl) - msg := fmt.Sprintf("[CQ:reply,id=%s]Pixiv ID:%f", a.MID, uid) + msg := fmt.Sprintf("[CQ:reply,id=%s]Pixiv ID:%d", a.MID, int64(uid)) a.SendMsg(msg) - return fmt.Sprintf("[CQ:image,file=%s,type=flash]", imgUrl) + return fmt.Sprintf("[CQ:image,file=%s]", imgUrl) }