diff --git a/bot.go b/bot.go index 20ae197..bf9545d 100644 --- a/bot.go +++ b/bot.go @@ -165,17 +165,10 @@ func preprocessMessageEvent(e *Event) { // preprocessNoticeEvent 更新事件 func preprocessNoticeEvent(e *Event) { - switch e.NoticeType { - case "group_upload", "friend_add", "friend_recall": - // - case "group_admin", "group_decrease", "group_increase", "group_ban", "group_recall", "honor": - if e.UserID == e.SelfID { - e.IsToMe = true - } - case "poke", "lucky_king": - if e.TargetID == e.SelfID { - e.IsToMe = true - } + if e.SubType == "poke" || e.SubType == "lucky_king" { + e.IsToMe = e.TargetID == e.SelfID + } else { + e.IsToMe = e.UserID == e.SelfID } }