mirror of
https://github.com/ultrasn0w/huso.git
synced 2025-12-15 17:29:52 +01:00
☮️
This commit is contained in:
@@ -27,7 +27,8 @@ func Arbeit() {
|
||||
}
|
||||
} else {
|
||||
cleared := 0
|
||||
checkDate := time.Now()
|
||||
checkDate := time.Now().Add(-1 * time.Hour)
|
||||
newCheckDate := time.Now()
|
||||
data, err := animeListCache.Get(bucketAppoint)
|
||||
if err == nil {
|
||||
nanora, err := BytesToInt64(data)
|
||||
@@ -35,7 +36,6 @@ func Arbeit() {
|
||||
checkDate = time.Unix(0, nanora)
|
||||
}
|
||||
}
|
||||
newCheckDate := time.Now()
|
||||
for _, a := range appoints {
|
||||
if a.Time.Add(22 * time.Hour).Before(newCheckDate) {
|
||||
// appointment expired
|
||||
@@ -48,7 +48,7 @@ func Arbeit() {
|
||||
cleared++
|
||||
}
|
||||
} else {
|
||||
if checkDate.Add(40*time.Minute).Before(a.Time) && newCheckDate.Add(60*time.Minute).After(a.Time) {
|
||||
if checkDate.Add(time.Hour).Before(a.Time) && newCheckDate.Add(time.Hour).After(a.Time) {
|
||||
// This has not happened and is happening soon
|
||||
go AnnounceBomb(a.Anime, a.Time.Unix(), time.Until(a.Time.Add(-25*time.Minute)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user