Update manager.go (#83)

避免bot自身加入群聊时触发群欢迎。
This commit is contained in:
yuanyan3060 2021-12-02 11:23:54 +08:00 committed by GitHub
parent 9df5b6cc33
commit 35587ccb85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))