mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 05:30:07 +08:00
🎨 改进代码样式
This commit is contained in:
parent
a745f424ad
commit
7d5d74eb62
@ -106,7 +106,6 @@ func fansData(groupID int64) {
|
|||||||
|
|
||||||
// 请求api
|
// 请求api
|
||||||
func fansapi(uid string) *follower {
|
func fansapi(uid string) *follower {
|
||||||
|
|
||||||
url := "https://api.vtbs.moe/v1/detail/" + uid
|
url := "https://api.vtbs.moe/v1/detail/" + uid
|
||||||
resp, err := http.Get(url)
|
resp, err := http.Get(url)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@ -6,9 +6,10 @@ import (
|
|||||||
"math/rand"
|
"math/rand"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/plugin_diana/data"
|
|
||||||
zero "github.com/wdvxdr1123/ZeroBot"
|
zero "github.com/wdvxdr1123/ZeroBot"
|
||||||
"github.com/wdvxdr1123/ZeroBot/message"
|
"github.com/wdvxdr1123/ZeroBot/message"
|
||||||
|
|
||||||
|
"github.com/FloatTech/ZeroBot-Plugin/plugin_diana/data"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|||||||
@ -66,7 +66,6 @@ func init() {
|
|||||||
|
|
||||||
// 发起api请求并把返回body交由json库解析
|
// 发起api请求并把返回body交由json库解析
|
||||||
func zhiwangapi(text string) *zhiwang {
|
func zhiwangapi(text string) *zhiwang {
|
||||||
|
|
||||||
url := "https://asoulcnki.asia/v1/api/check"
|
url := "https://asoulcnki.asia/v1/api/check"
|
||||||
post := "{\n\"text\":\"" + text + "\"\n}"
|
post := "{\n\"text\":\"" + text + "\"\n}"
|
||||||
var jsonStr = []byte(post)
|
var jsonStr = []byte(post)
|
||||||
|
|||||||
@ -68,12 +68,10 @@ func init() {
|
|||||||
pom2 := soutujson.Illusts[rannum].ImageUrls.Large[19:]
|
pom2 := soutujson.Illusts[rannum].ImageUrls.Large[19:]
|
||||||
ctx.SendChain(message.Image(pom1 + pom2))
|
ctx.SendChain(message.Image(pom1 + pom2))
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// soutuapi 请求api
|
// soutuapi 请求api
|
||||||
func soutuapi(keyword string) *resultjson {
|
func soutuapi(keyword string) *resultjson {
|
||||||
|
|
||||||
url := "https://api.pixivel.moe/pixiv?type=search&page=0&mode=partial_match_for_tags&word=" + keyword
|
url := "https://api.pixivel.moe/pixiv?type=search&page=0&mode=partial_match_for_tags&word=" + keyword
|
||||||
method := "GET"
|
method := "GET"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user