forked from FloatTech/ZeroBot-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f90283
commit 8233950
Showing
6 changed files
with
19 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
package qingyunke | ||
import ( | ||
|
||
|
||
import ( | ||
zero "github.com/wdvxdr1123/ZeroBot" | ||
"log" | ||
|
||
) | ||
|
||
//自动同意加群,加好友 | ||
func init() { | ||
func init() { | ||
zero.OnRequest().SetBlock(false).FirstPriority().Handle(func(ctx *zero.Ctx) { | ||
if ctx.Event.RequestType == "friend"{ | ||
if ctx.Event.RequestType == "friend" { | ||
log.Println("加好友") | ||
ctx.SetFriendAddRequest(ctx.Event.Flag,true,"") | ||
ctx.SetFriendAddRequest(ctx.Event.Flag, true, "") | ||
} | ||
if ctx.Event.RequestType == "group" && ctx.Event.SubType == "invite"{ | ||
if ctx.Event.RequestType == "group" && ctx.Event.SubType == "invite" { | ||
log.Println("加群") | ||
ctx.SetGroupAddRequest(ctx.Event.Flag,"invite",true,"我爱你,mua~") | ||
ctx.SetGroupAddRequest(ctx.Event.Flag, "invite", true, "我爱你,mua~") | ||
} | ||
}) | ||
|
||
|
||
} |