Use UserNotifications.CountUnseen()

This commit is contained in:
2018-03-03 23:37:30 +01:00
parent 195ec9b0fa
commit 36182d11c7
2 changed files with 18 additions and 8 deletions

View 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)
}
}
}