Skip to content

Commit

Permalink
Update manager.go (FloatTech#83)
Browse files Browse the repository at this point in the history
避免bot自身加入群聊时触发群欢迎。
  • Loading branch information
yuanyan3060 authored Dec 2, 2021
1 parent 9df5b6c commit 35587cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin_manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 35587cc

Please sign in to comment.