aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <anhgelus@anhgelus.world>2025-08-18 13:56:32 +0200
committerAnhgelus Morhtuuzh <anhgelus@anhgelus.world>2025-08-18 13:56:32 +0200
commit026abcc07a57eeda8a08a746ad2b664e956360f3 (patch)
treea5705ceb2b192c9ee18c4cce575a2251e3b72d1d /main.go
parentcf2093095e769cdfac7fd83adc61d7ff6e958c0a (diff)
feat(xp): increase precision of timestamp
seems like to fix periodic reducer not working
Diffstat (limited to 'main.go')
-rw-r--r--main.go10
1 files changed, 9 insertions, 1 deletions
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)
})
}