From 765c4784ec0d96a5b4d9eb83e33855ed42bb6693 Mon Sep 17 00:00:00 2001 From: yuanyan3060 <58114805+yuanyan3060@users.noreply.github.com> Date: Wed, 1 Dec 2021 22:42:22 +0800 Subject: [PATCH] Update manager.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免bot自身加入群聊时触发群欢迎。 --- plugin_manager/manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin_manager/manager.go b/plugin_manager/manager.go index 59f598cc21..840fe29e56 100644 --- a/plugin_manager/manager.go +++ b/plugin_manager/manager.go @@ -361,7 +361,7 @@ func init() { // 插件主体 // 入群欢迎 zero.OnNotice().SetBlock(false).FirstPriority(). Handle(func(ctx *zero.Ctx) { - if ctx.Event.NoticeType == "group_increase" { + if ctx.Event.NoticeType == "group_increase" && ctx.Event.SelfID!=ctx.Event.UserID { word, ok := config.Welcome[uint64(ctx.Event.GroupID)] if ok { ctx.SendChain(message.Text(word))