chore: del wangyiyun due to 跑路

This commit is contained in:
源文雨 2024-05-01 03:18:31 +09:00
parent 730ab28d92
commit 9eadefba73
3 changed files with 0 additions and 43 deletions

View File

@ -1300,14 +1300,6 @@ print("run[CQ:image,file="+j["img"]+"]")
- [x] 查看钱包排名
</details>
<details>
<summary>网易云音乐热评</summary>
`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/wangyiyun"`
- [x] 来份网易云热评
</details>
<details>
<summary>据意查句</summary>

View File

@ -135,7 +135,6 @@ import (
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/vtbmusic" // vtb点歌
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/vtbquotation" // vtb语录
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/wallet" // 钱包
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/wangyiyun" // 网易云音乐热评
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/wantquotes" // 据意查句
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/warframeapi" // warframeAPI插件
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/wenben" // 文本指令大全

View File

@ -1,34 +0,0 @@
// Package wangyiyun 网易云音乐热评
package wangyiyun
import (
"github.com/FloatTech/floatbox/web"
ctrl "github.com/FloatTech/zbpctrl"
"github.com/FloatTech/zbputils/control"
"github.com/FloatTech/zbputils/ctxext"
zero "github.com/wdvxdr1123/ZeroBot"
"github.com/wdvxdr1123/ZeroBot/message"
"github.com/wdvxdr1123/ZeroBot/utils/helper"
)
const (
wangyiyunURL = "https://api.gmit.vip/Api/HotComments?format=text"
wangyiyunReferer = "https://api.gmit.vip/"
ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36"
)
func init() {
control.AutoRegister(&ctrl.Options[*zero.Ctx]{
DisableOnDefault: false,
Brief: "网易云热评",
Help: "- 来份网易云热评",
}).OnFullMatch("来份网易云热评").SetBlock(true).Limit(ctxext.LimitByUser).
Handle(func(ctx *zero.Ctx) {
data, err := web.RequestDataWith(web.NewDefaultClient(), wangyiyunURL, "GET", wangyiyunReferer, ua, nil)
if err != nil {
ctx.SendChain(message.Text("ERROR: ", err))
return
}
ctx.SendChain(message.Text(helper.BytesToString(data)))
})
}