update
This commit is contained in:
@@ -2,6 +2,7 @@ package qq
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"sync"
|
||||
@@ -244,6 +245,13 @@ func start() {
|
||||
bot.Client.OnSelfPrivateMessage(onPrivateMessage)
|
||||
bot.Client.OnSelfGroupMessage(OnGroupMessage)
|
||||
}
|
||||
|
||||
bot.Client.OnNewFriendRequest(func(_ *client.QQClient, request *client.NewFriendRequest) {
|
||||
if qq.GetBool("auto_friend", false) == true {
|
||||
request.Accept()
|
||||
core.NotifyMasters(fmt.Sprintf("QQ已同意%v的好友申请,验证信息为:%v", request.RequesterUin, request.Message))
|
||||
}
|
||||
})
|
||||
core.Pushs["qq"] = func(i int, s string) {
|
||||
bot.SendPrivateMessage(int64(i), int64(qq.GetInt("groupCode")), &message.SendingMessage{Elements: []message.IMessageElement{&message.TextElement{Content: s}}})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user