From 3e65b4f6281ddc4039a27a62428db8a95ffc3677 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Thu, 22 Jan 2026 21:53:29 +0100 Subject: refactor(): completely remove old gokord and finish to update everything to use contexts --- exp/functions.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'exp') diff --git a/exp/functions.go b/exp/functions.go index 681c135..8d5b3af 100644 --- a/exp/functions.go +++ b/exp/functions.go @@ -1,6 +1,7 @@ package exp import ( + "context" "fmt" "math" "regexp" @@ -8,7 +9,7 @@ import ( "strings" "time" - "github.com/anhgelus/gokord" + "git.anhgelus.world/anhgelus/les-copaings-bot/common" ) const DebugFactor = 30 @@ -66,9 +67,9 @@ func LevelXP(level uint) uint { } // TimeStampNDaysBefore returns the timestamp (year-month-day) n days before today -func TimeStampNDaysBefore(n uint) string { +func TimeStampNDaysBefore(ctx context.Context, n uint) string { var unix time.Time - if gokord.Debug { + if common.IsDebug(ctx) { unix = time.Unix(time.Now().Unix()-int64(DebugFactor*n), 0) // reduce time for debug } else { unix = time.Unix(time.Now().Unix()-int64(n*24*60*60), 0) -- cgit v1.2.3