aboutsummaryrefslogtreecommitdiff
path: root/user/xp.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-01-22 21:53:29 +0100
committerAnhgelus Morhtuuzh <william@herges.fr>2026-01-22 21:53:29 +0100
commit3e65b4f6281ddc4039a27a62428db8a95ffc3677 (patch)
treeb1005f908be45aa47da48b604f3863ef23a3d7ea /user/xp.go
parent8255a2e51454049f3ac1532f6e1125f528691c37 (diff)
refactor(): completely remove old gokord and finish to update everything to use contexts
Diffstat (limited to 'user/xp.go')
-rw-r--r--user/xp.go4
1 files changed, 2 insertions, 2 deletions
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)
}
}