diff options
| author | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-04-15 18:47:52 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-04-15 18:47:52 +0200 |
| commit | 2aaeb2115b25952b71113a683b466c00cb92e690 (patch) | |
| tree | 6d95b74f7d7e7efcccba5b46200d4c3e161263f3 /xp/events.go | |
| parent | c1e4653a5c7ae34dd23d442f67a171eff466aad3 (diff) | |
feat(xp): basic reducer
Diffstat (limited to 'xp/events.go')
| -rw-r--r-- | xp/events.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xp/events.go b/xp/events.go index 4940c0b..c3b843c 100644 --- a/xp/events.go +++ b/xp/events.go @@ -30,6 +30,7 @@ func OnMessage(s *discordgo.Session, m *discordgo.MessageCreate) { return } c := GetCopaing(m.Author.ID, m.GuildID) + onLastEventUpdate(c) // add xp trimmed := utils.TrimMessage(strings.ToLower(m.Content)) m.Member.User = m.Author @@ -62,6 +63,7 @@ func OnVoiceUpdate(s *discordgo.Session, e *discordgo.VoiceStateUpdate) { if e.Member.User.Bot { return } + onLastEventUpdate(GetCopaing(e.UserID, e.GuildID)) cfg := config.GetGuildConfig(e.GuildID) if cfg.IsDisabled(e.ChannelID) { return |
