mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
chore: del quan due to 跑路
This commit is contained in:
parent
83b46dd071
commit
730ab28d92
12
README.md
12
README.md
@ -1106,18 +1106,6 @@ print("run[CQ:image,file="+j["img"]+"]")
|
|||||||
|
|
||||||
- [x] 重置花名册
|
- [x] 重置花名册
|
||||||
|
|
||||||
</details>
|
|
||||||
<details>
|
|
||||||
<summary>权重查询</summary>
|
|
||||||
|
|
||||||
`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/quan"`
|
|
||||||
|
|
||||||
- 来看看大家的账号分吧~据说越高越不容易封号哦
|
|
||||||
|
|
||||||
- [x] 权重查询+@xxx
|
|
||||||
|
|
||||||
- [x] 权重查询+QQ号(为空时匹配触发者QQ)
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
<details>
|
<details>
|
||||||
<summary>qq空间表白墙</summary>
|
<summary>qq空间表白墙</summary>
|
||||||
|
|||||||
1
main.go
1
main.go
@ -117,7 +117,6 @@ import (
|
|||||||
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/nwife" // 本地老婆
|
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/nwife" // 本地老婆
|
||||||
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/omikuji" // 浅草寺求签
|
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/omikuji" // 浅草寺求签
|
||||||
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/qqwife" // 一群一天一夫一妻制群老婆
|
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/qqwife" // 一群一天一夫一妻制群老婆
|
||||||
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/quan" // QQ权重查询
|
|
||||||
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/qzone" // qq空间表白墙
|
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/qzone" // qq空间表白墙
|
||||||
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/realcugan" // realcugan清晰术
|
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/realcugan" // realcugan清晰术
|
||||||
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/reborn" // 投胎
|
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/reborn" // 投胎
|
||||||
|
|||||||
@ -1,60 +0,0 @@
|
|||||||
// Package quan qq权重查询
|
|
||||||
package quan
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
"strconv"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/FloatTech/floatbox/web"
|
|
||||||
ctrl "github.com/FloatTech/zbpctrl"
|
|
||||||
"github.com/FloatTech/zbputils/control"
|
|
||||||
zero "github.com/wdvxdr1123/ZeroBot"
|
|
||||||
"github.com/wdvxdr1123/ZeroBot/message"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
quan = "http://tfapi.top/API/qqqz.php?type=json&qq=" // api
|
|
||||||
)
|
|
||||||
|
|
||||||
type result struct {
|
|
||||||
Code int `json:"code"`
|
|
||||||
Msg string `json:"msg"`
|
|
||||||
Qz string `json:"qz"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() { // 主函数
|
|
||||||
en := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
|
|
||||||
DisableOnDefault: false,
|
|
||||||
Brief: "QQ权重查询",
|
|
||||||
Help: "权重查询方式\n" +
|
|
||||||
"- 权重查询+@xxx" +
|
|
||||||
"- 权重查询+QQ号(可以不写,默认本人)",
|
|
||||||
})
|
|
||||||
en.OnRegex(`^权重查询\s*(\[CQ:at,qq=)?(\d+)?`).SetBlock(true).Handle(func(ctx *zero.Ctx) {
|
|
||||||
str := ctx.State["regex_matched"].([]string)[2] // 获取uid
|
|
||||||
if str == "" { // user
|
|
||||||
str = strconv.FormatInt(ctx.Event.UserID, 10)
|
|
||||||
}
|
|
||||||
es, err := web.GetData(quan + str) // 将网站返回结果赋值
|
|
||||||
if err != nil {
|
|
||||||
ctx.SendChain(message.Text("出现错误捏: ", err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
var data result
|
|
||||||
err = json.Unmarshal(es, &data)
|
|
||||||
if err != nil {
|
|
||||||
ctx.SendChain(message.Text("解析json错误: ", err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
var msg strings.Builder
|
|
||||||
msg.WriteString("查询账号: ")
|
|
||||||
msg.WriteString(str)
|
|
||||||
msg.WriteString("\n")
|
|
||||||
msg.WriteString("查询状态: ")
|
|
||||||
msg.WriteString(data.Msg)
|
|
||||||
msg.WriteString("\n您的权重为: ")
|
|
||||||
msg.WriteString(data.Qz)
|
|
||||||
ctx.SendChain(message.Text(msg.String())) // 输出结果
|
|
||||||
})
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user