feat(xp): basic reducer
This commit is contained in:
parent
c1e4653a5c
commit
2aaeb2115b
3 changed files with 13 additions and 1 deletions
|
@ -42,3 +42,10 @@ func onNewLevel(s *discordgo.Session, m *discordgo.Member, level uint) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func onLastEventUpdate(c *Copaing) {
|
||||
h := c.HourSinceLastEvent()
|
||||
c.XP -= Lose(h, c.XP)
|
||||
c.Save()
|
||||
c.SetLastEvent()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue