diff options
| author | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-04-16 15:23:15 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-04-16 15:23:15 +0200 |
| commit | ef39c156f94b854796bb1c2adddfd40a5acaeca8 (patch) | |
| tree | ac24922c2b02f4d17c66bfaabc16aee1f13fd7c9 /commands/rank.go | |
| parent | c3dc81bd29318a4916bf8fc383a0d1a5ca90fa64 (diff) | |
feat(reducer): role update on new level
Diffstat (limited to 'commands/rank.go')
| -rw-r--r-- | commands/rank.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/rank.go b/commands/rank.go index d056de1..219977d 100644 --- a/commands/rank.go +++ b/commands/rank.go @@ -10,7 +10,7 @@ import ( func Rank(s *discordgo.Session, i *discordgo.InteractionCreate) { optMap := utils.GenerateOptionMap(i) c := xp.GetCopaing(i.Member.User.ID, i.GuildID) // current copaing = member who used /rank - xp.LastEventUpdate(c) // update xp and reset last event + xp.LastEventUpdate(s, c) // update xp and reset last event msg := "Votre niveau" m := i.Member var err error @@ -41,7 +41,7 @@ func Rank(s *discordgo.Session, i *discordgo.InteractionCreate) { } c.DiscordID = u.ID // current copaing = member targeted by member who wrote /rank c.Load() // reload copaing (change line before) - xp.XPUpdate(c) // update xp without resetting event + xp.XPUpdate(s, c) // update xp without resetting event msg = fmt.Sprintf("Le niveau de %s", m.DisplayName()) } lvl := xp.Level(c.XP) |
