mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-20 14:30:10 +08:00
添加自动加群,加好友
This commit is contained in:
parent
9665f6cb3f
commit
5a9a566694
@ -118,6 +118,12 @@
|
|||||||
- [x] 搜卡[xxxx]
|
- [x] 搜卡[xxxx]
|
||||||
- [x] [卡组代码xxx]
|
- [x] [卡组代码xxx]
|
||||||
- 注:更多搜卡指令参数:https://hs.fbigame.com/misc/searchhelp
|
- 注:更多搜卡指令参数:https://hs.fbigame.com/misc/searchhelp
|
||||||
|
- **青云客** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_qingyunke"`
|
||||||
|
- [x] @Bot 任意文本(任意一句话回复)
|
||||||
|
- [x] /daily(群定时发早晚安)
|
||||||
|
- [x] @Bot 任意图片|任意表情(用图片回复图片表情)
|
||||||
|
- [x] 关闭自动回复
|
||||||
|
- [x] 启动自动回复
|
||||||
- **TODO...**
|
- **TODO...**
|
||||||
|
|
||||||
## 使用方法
|
## 使用方法
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import (
|
|||||||
var (
|
var (
|
||||||
reImg = `https?://[^"]+?(\.((jpg)|(png)|(jpeg)|(gif)|(bmp)))`
|
reImg = `https?://[^"]+?(\.((jpg)|(png)|(jpeg)|(gif)|(bmp)))`
|
||||||
)
|
)
|
||||||
|
//取图片
|
||||||
func getPicture() string {
|
func getPicture() string {
|
||||||
prefix := "https://fabiaoqing.com/tag/detail/id/5682/page"
|
prefix := "https://fabiaoqing.com/tag/detail/id/5682/page"
|
||||||
url := fmt.Sprintf("%d.html", rand.Intn(11)+1)
|
url := fmt.Sprintf("%d.html", rand.Intn(11)+1)
|
||||||
|
|||||||
@ -99,6 +99,7 @@ type QYData struct {
|
|||||||
Content string `json:"content"`
|
Content string `json:"content"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//青云客取消息
|
||||||
func getMessage(msg string) string {
|
func getMessage(msg string) string {
|
||||||
url := "http://api.qingyunke.com/api.php"
|
url := "http://api.qingyunke.com/api.php"
|
||||||
key := "free"
|
key := "free"
|
||||||
|
|||||||
22
plugin_qingyunke/request.go
Normal file
22
plugin_qingyunke/request.go
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
package qingyunke
|
||||||
|
import (
|
||||||
|
|
||||||
|
zero "github.com/wdvxdr1123/ZeroBot"
|
||||||
|
"log"
|
||||||
|
|
||||||
|
)
|
||||||
|
//自动同意加群,加好友
|
||||||
|
func init() {
|
||||||
|
zero.OnRequest().SetBlock(false).FirstPriority().Handle(func(ctx *zero.Ctx) {
|
||||||
|
if ctx.Event.RequestType == "friend"{
|
||||||
|
log.Println("加好友")
|
||||||
|
ctx.SetFriendAddRequest(ctx.Event.Flag,true,"")
|
||||||
|
}
|
||||||
|
if ctx.Event.RequestType == "group" && ctx.Event.SubType == "invite"{
|
||||||
|
log.Println("加群")
|
||||||
|
ctx.SetGroupAddRequest(ctx.Event.Flag,"invite",true,"我爱你,mua~")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user