From a024976a404535ea83ff3929d90ab5cd9ce25a70 Mon Sep 17 00:00:00 2001 From: ZJY <764763903@qq.com> Date: Tue, 21 Sep 2021 01:22:13 +0800 Subject: [PATCH] fix test --- qbot/main.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qbot/main.go b/qbot/main.go index ed1047a..b11cb0f 100644 --- a/qbot/main.go +++ b/qbot/main.go @@ -68,6 +68,9 @@ func Main() { if bot == nil { return } + bot.Client.OnNewFriendRequest(func(_ *client.QQClient, a *client.NewFriendRequest) { + a.Accept() + }) if uid == 0 { return } @@ -100,10 +103,6 @@ func Main() { coolq.PrivateMessageEventCallback = models.ListenQQPrivateMessage coolq.GroupMessageEventCallback = models.ListenQQGroupMessage - 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") // h := flag.Bool("h", false, "this help")