From 53cb622c3f7eef71bf12aa014cfa7068965f2680 Mon Sep 17 00:00:00 2001 From: ZJY <764763903@qq.com> Date: Tue, 21 Sep 2021 01:20:02 +0800 Subject: [PATCH] fix test --- models/bot.go | 6 ++++-- qbot/main.go | 8 +++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/models/bot.go b/models/bot.go index 1c7ee9f..9ca251e 100644 --- a/models/bot.go +++ b/models/bot.go @@ -19,9 +19,7 @@ var SendQQ = func(a int64, b interface{}) { var SendQQGroup = func(a int64, b int64, c interface{}) { } -var AggreQQ = func(a int64, b bool, c interface{}) { -} var ListenQQPrivateMessage = func(uid int64, msg string) { SendQQ(uid, handleMessage(msg, "qq", int(uid))) } @@ -38,6 +36,10 @@ var ListenQQGroupMessage = func(gid int64, uid int64, msg string) { var replies = map[string]string{} +func AggQQ() { + +} + func InitReplies() { f, err := os.Open(ExecPath + "/conf/reply.php") if err == nil { diff --git a/qbot/main.go b/qbot/main.go index d535b5d..ed1047a 100644 --- a/qbot/main.go +++ b/qbot/main.go @@ -100,11 +100,9 @@ func Main() { coolq.PrivateMessageEventCallback = models.ListenQQPrivateMessage coolq.GroupMessageEventCallback = models.ListenQQGroupMessage - OnFriendMessage := func(_ *client.QQClient, m *client.NewFriendRequest) { - m.Accept() - } - - bot.Client.OnNewFriendRequest(OnFriendMessage) + bot.Client.OnNewFriendRequest(func(_ *client.QQClient, a *client.NewFriendRequest) { + a.Accept() + }) // c := flag.String("c", config.DefaultConfigFile, "configuration filename default is config.hjson") // d := flag.Bool("d", false, "running as a daemon")