Use UserNotifications.CountUnseen()
This commit is contained in:
17
patches/notification-emails/notification-emails.go
Normal file
17
patches/notification-emails/notification-emails.go
Normal file
@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/animenotifier/arn"
|
||||
)
|
||||
|
||||
func main() {
|
||||
defer arn.Node.Close()
|
||||
|
||||
for user := range arn.StreamUsers() {
|
||||
if user.Notifications().CountUnseen() <= 10 && !user.IsActive() && user.Email != "" && len(user.AnimeList().Items) > 0 {
|
||||
fmt.Println(user.Email)
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user