feat(deps): update to gokord v0.3.0

This commit is contained in:
Anhgelus Morhtuuzh 2024-04-18 12:32:29 +02:00
parent 18fec5a866
commit 1f5c649169
No known key found for this signature in database
GPG key ID: CF4550297832A29F
7 changed files with 184 additions and 60 deletions

View file

@ -40,8 +40,19 @@ func Rank(s *discordgo.Session, i *discordgo.InteractionCreate) {
return
}
c.DiscordID = u.ID // current copaing = member targeted by member who wrote /rank
c.Load() // reload copaing (change line before)
xp.XPUpdate(s, c) // update xp without resetting event
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
msg = fmt.Sprintf("Le niveau de %s", m.DisplayName())
}
lvl := xp.Level(c.XP)