diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2026-01-22 21:53:29 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2026-01-22 21:53:29 +0100 |
| commit | 3e65b4f6281ddc4039a27a62428db8a95ffc3677 (patch) | |
| tree | b1005f908be45aa47da48b604f3863ef23a3d7ea /user/xp.go | |
| parent | 8255a2e51454049f3ac1532f6e1125f528691c37 (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.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) } } |
