mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
23 lines
511 B
Go
23 lines
511 B
Go
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~")
|
||
}
|
||
})
|
||
|
||
|
||
}
|