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 --- user/xp.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user/xp.go') diff --git a/user/xp.go b/user/xp.go index ca08258..d2b7ca6 100644 --- a/user/xp.go +++ b/user/xp.go @@ -23,7 +23,7 @@ func (c *cXP) GetXP() uint { return c.Cxp } -func (cc *CopaingCached) AddXP(ctx context.Context, s bot.Session, m *user.Member, xp uint, fn func(uint, uint)) { +func (cc *CopaingCached) AddXP(ctx context.Context, dg bot.Session, m *user.Member, xp uint, fn func(uint, uint)) { old := cc.XP pastLevel := exp.Level(old) bot.Logger(ctx).Debug("adding xp", "user", m.DisplayName(), "old", old, "to add", xp) @@ -39,7 +39,7 @@ func (cc *CopaingCached) AddXP(ctx context.Context, s bot.Session, m *user.Membe newLevel := exp.Level(old + xp) if newLevel > pastLevel { fn(old+xp, newLevel) - onNewLevel(ctx, s, m, newLevel) + onNewLevel(ctx, dg, m, newLevel) } } -- cgit v1.2.3