From 026abcc07a57eeda8a08a746ad2b664e956360f3 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Mon, 18 Aug 2025 13:56:32 +0200 Subject: feat(xp): increase precision of timestamp seems like to fix periodic reducer not working --- main.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 4610bc4..cfd4b58 100644 --- a/main.go +++ b/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) }) } -- cgit v1.2.3