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

@ -93,7 +93,18 @@ func LastEventUpdate(s *discordgo.Session, c *Copaing) {
)
c.OnNewLevel(s, lvl)
}
c.Save()
if err := c.Save(); err != nil {
utils.SendAlert(
"xp/level.go - Saving copaing",
err.Error(),
"xp",
c.XP,
"discord_id",
c.DiscordID,
"guild_id",
c.GuildID,
)
}
}
c.SetLastEvent()
}
@ -136,7 +147,18 @@ func XPUpdate(s *discordgo.Session, c *Copaing) {
c.OnNewLevel(s, lvl)
}
utils.SendDebug("Save XP", "old", oldXP, "new", c.XP, "user", c.DiscordID)
c.Save()
if err := c.Save(); err != nil {
utils.SendAlert(
"xp/level.go - Saving copaing",
err.Error(),
"xp",
c.XP,
"discord_id",
c.DiscordID,
"guild_id",
c.GuildID,
)
}
}
}