aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
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)
})
}