File tree Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -1067,6 +1067,17 @@ NeteaseCloudMusicApi项目地址:https://binaryify.github.io/NeteaseCloudMusicAp
1067
1067
1068
1068
- [x] 重置花名册
1069
1069
1070
+ </details >
1071
+ <details >
1072
+ <summary >权重查询</summary >
1073
+
1074
+ ` import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/quan" `
1075
+
1076
+ - 来看看大家的账号分吧~ 据说越高越不容易封号哦
1077
+
1078
+ - [x] 权重查询+@xxx
1079
+
1080
+ - [x] 权重查询+QQ号(为空时匹配触发者QQ)
1070
1081
1071
1082
</details >
1072
1083
<details >
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ import (
114
114
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/nsfw" // nsfw图片识别
115
115
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/omikuji" // 浅草寺求签
116
116
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/qqwife" // 一群一天一夫一妻制群老婆
117
+ _ "github.com/FloatTech/ZeroBot-Plugin/plugin/quan" // QQ权重查询
117
118
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/qzone" // qq空间表白墙
118
119
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/realcugan" // realcugan清晰术
119
120
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/reborn" // 投胎
Original file line number Diff line number Diff line change
1
+ // Package quan qq权重查询
2
+ package quan
3
+
4
+ import (
5
+ "fmt"
6
+ "github.com/FloatTech/floatbox/web"
7
+ ctrl "github.com/FloatTech/zbpctrl"
8
+ "github.com/FloatTech/zbputils/control"
9
+ zero "github.com/wdvxdr1123/ZeroBot"
10
+ "github.com/wdvxdr1123/ZeroBot/message"
11
+ "github.com/wdvxdr1123/ZeroBot/utils/helper"
12
+ "strconv"
13
+ )
14
+
15
+ const (
16
+ quan = "http://tfkapi.top/API/qqqz.php?qq=%v" // api
17
+ )
18
+
19
+ func init () { // 主函数
20
+ en := control .Register ("quan" , & ctrl.Options [* zero.Ctx ]{
21
+ DisableOnDefault : false ,
22
+ Brief : "QQ权重查询" ,
23
+ Help : "权重查询方式\n " +
24
+ "- 权重查询+@xxx" +
25
+ "- 权重查询+QQ号(可以不写,默认本人)" ,
26
+ })
27
+ en .OnRegex (`^权重查询\s*(\[CQ:at,qq=)?(\d+)?` ).SetBlock (true ).Handle (func (ctx * zero.Ctx ) {
28
+ str := ctx .State ["regex_matched" ].([]string )[2 ] //获取uid
29
+ if str == "" { //user
30
+ str = strconv .FormatInt (ctx .Event .UserID , 10 )
31
+ }
32
+ es , err := web .GetData (fmt .Sprintf (quan , str )) // 将网站返回结果赋值
33
+ if err != nil {
34
+ ctx .SendChain (message .Text ("出现错误捏:" , err ))
35
+ return
36
+ }
37
+ ctx .SendChain (message .Text (str , helper .BytesToString (es ))) // 输出结果
38
+ })
39
+
40
+ }
You can’t perform that action at this time.
0 commit comments