Skip to content

Commit

Permalink
fix IsToMe (#17)
Browse files Browse the repository at this point in the history
* fix IsToMe

* fix IsToMe
  • Loading branch information
kanrichan committed Apr 7, 2021
1 parent 3aab063 commit 7cb1b23
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions bot.go
Expand Up @@ -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
}
}

Expand Down

0 comments on commit 7cb1b23

Please sign in to comment.