fix(command): rank for member not working
This commit is contained in:
parent
c19bbf1d1e
commit
d485b0de1c
1 changed files with 2 additions and 14 deletions
|
@ -39,20 +39,8 @@ func Rank(s *discordgo.Session, i *discordgo.InteractionCreate) {
|
|||
}
|
||||
return
|
||||
}
|
||||
c.DiscordID = u.ID // current copaing = member targeted by member who wrote /rank
|
||||
err = c.Load() // reload copaing (change line before)
|
||||
if err != nil {
|
||||
utils.SendAlert(
|
||||
"commands/rank.go - Loading copaing",
|
||||
err.Error(),
|
||||
"discord_id",
|
||||
u.ID,
|
||||
"guild_id",
|
||||
i.GuildID,
|
||||
)
|
||||
return
|
||||
}
|
||||
xp.XPUpdate(s, c) // update xp without resetting event
|
||||
c = xp.GetCopaing(u.ID, i.GuildID) // current copaing = member targeted by member who wrote /rank
|
||||
xp.XPUpdate(s, c) // update xp without resetting event
|
||||
msg = fmt.Sprintf("Le niveau de %s", m.DisplayName())
|
||||
}
|
||||
lvl := xp.Level(c.XP)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue