feat(xp): increase precision of timestamp
seems like to fix periodic reducer not working
This commit is contained in:
parent
cf2093095e
commit
026abcc07a
5 changed files with 20 additions and 33 deletions
10
main.go
10
main.go
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue