feat(xp): increase precision of timestamp

seems like to fix periodic reducer not working
This commit is contained in:
Anhgelus Morhtuuzh 2025-08-18 13:56:32 +02:00
parent cf2093095e
commit 026abcc07a
Signed by: anhgelus
GPG key ID: CAD341EFA92DDDE5
5 changed files with 20 additions and 33 deletions

10
main.go
View file

@ -195,7 +195,15 @@ func afterInit(dg *discordgo.Session) {
dg.AddHandler(OnVoiceUpdate)
dg.AddHandler(OnLeave)
stopPeriodicReducer = utils.NewTimer(24*time.Hour, func(stop chan<- interface{}) {
d := 24 * time.Hour
if gokord.Debug {
d = 24 * time.Second
}
user.PeriodicReducer(dg)
stopPeriodicReducer = utils.NewTimer(d, func(stop chan<- interface{}) {
utils.SendDebug("Periodic reducer")
user.PeriodicReducer(dg)
})
}