diff options
| author | Anhgelus Morhtuuzh <anhgelus@anhgelus.world> | 2025-08-18 13:56:32 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <anhgelus@anhgelus.world> | 2025-08-18 13:56:32 +0200 |
| commit | 026abcc07a57eeda8a08a746ad2b664e956360f3 (patch) | |
| tree | a5705ceb2b192c9ee18c4cce575a2251e3b72d1d /main.go | |
| parent | cf2093095e769cdfac7fd83adc61d7ff6e958c0a (diff) | |
feat(xp): increase precision of timestamp
seems like to fix periodic reducer not working
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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) }) } |
