feat(deps): update to gokord v0.3.0
This commit is contained in:
parent
18fec5a866
commit
1f5c649169
7 changed files with 184 additions and 60 deletions
26
xp/level.go
26
xp/level.go
|
@ -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,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue