Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
aimerneige committed Jul 30, 2022
1 parent e9e8388 commit 8219876
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions morning.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ func (m *morning) Serve(b *bot.Bot) {
s.Every(1).Day().At("00:00").Do(func() {
groupList := b.GroupList
for _, group := range groupList {
if isIgnoredGroup(group.Uin) {
continue
}
b.SendGroupMessage(group.Code, msg)
}
})
Expand All @@ -76,3 +79,12 @@ func (m *morning) Stop(b *bot.Bot, wg *sync.WaitGroup) {
// 别忘了解锁
defer wg.Done()
}

func isIgnoredGroup(id int64) bool {
for _, groupID := range ignoredGroup {
if id == groupID {
return true
}
}
return false
}

0 comments on commit 8219876

Please sign in to comment.