aboutsummaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/rank.go4
-rw-r--r--commands/top.go2
2 files changed, 3 insertions, 3 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)
diff --git a/commands/top.go b/commands/top.go
index 6df259f..c0f4dae 100644
--- a/commands/top.go
+++ b/commands/top.go
@@ -9,7 +9,7 @@ import (
)
func Top(s *discordgo.Session, i *discordgo.InteractionCreate) {
- xp.LastEventUpdate(xp.GetCopaing(i.User.ID, i.GuildID))
+ xp.LastEventUpdate(s, xp.GetCopaing(i.User.ID, i.GuildID))
resp := utils.ResponseBuilder{C: s, I: i}
err := resp.IsDeferred().Send()
if err != nil {