From 9eadefba73755182c76a210041a2e4fee7ebc0fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?=
<41315874+fumiama@users.noreply.github.com>
Date: Wed, 1 May 2024 03:18:31 +0900
Subject: [PATCH] =?UTF-8?q?chore:=20del=20wangyiyun=20due=20to=20=E8=B7=91?=
=?UTF-8?q?=E8=B7=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 8 --------
main.go | 1 -
plugin/wangyiyun/main.go | 34 ----------------------------------
3 files changed, 43 deletions(-)
delete mode 100644 plugin/wangyiyun/main.go
diff --git a/README.md b/README.md
index b65a470430..81585bd110 100644
--- a/README.md
+++ b/README.md
@@ -1300,14 +1300,6 @@ print("run[CQ:image,file="+j["img"]+"]")
- [x] 查看钱包排名
-
-
- 网易云音乐热评
-
- `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/wangyiyun"`
-
- - [x] 来份网易云热评
-
据意查句
diff --git a/main.go b/main.go
index 63bdd5dc0a..3c473cfb1f 100644
--- a/main.go
+++ b/main.go
@@ -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" // 文本指令大全
diff --git a/plugin/wangyiyun/main.go b/plugin/wangyiyun/main.go
deleted file mode 100644
index 5c56d1d6d3..0000000000
--- a/plugin/wangyiyun/main.go
+++ /dev/null
@@ -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)))
- })
-}