diff options
Diffstat (limited to 'xp')
| -rw-r--r-- | xp/events.go | 4 | ||||
| -rw-r--r-- | xp/level.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/xp/events.go b/xp/events.go index c3b843c..655e9fd 100644 --- a/xp/events.go +++ b/xp/events.go @@ -30,7 +30,7 @@ func OnMessage(s *discordgo.Session, m *discordgo.MessageCreate) { return } c := GetCopaing(m.Author.ID, m.GuildID) - onLastEventUpdate(c) + LastEventUpdate(c) // add xp trimmed := utils.TrimMessage(strings.ToLower(m.Content)) m.Member.User = m.Author @@ -63,7 +63,7 @@ func OnVoiceUpdate(s *discordgo.Session, e *discordgo.VoiceStateUpdate) { if e.Member.User.Bot { return } - onLastEventUpdate(GetCopaing(e.UserID, e.GuildID)) + LastEventUpdate(GetCopaing(e.UserID, e.GuildID)) cfg := config.GetGuildConfig(e.GuildID) if cfg.IsDisabled(e.ChannelID) { return diff --git a/xp/level.go b/xp/level.go index 14d0e95..b179cdb 100644 --- a/xp/level.go +++ b/xp/level.go @@ -43,7 +43,7 @@ func onNewLevel(s *discordgo.Session, m *discordgo.Member, level uint) { } } -func onLastEventUpdate(c *Copaing) { +func LastEventUpdate(c *Copaing) { h := c.HourSinceLastEvent() l := Lose(h, c.XP) xp := c.XPAlreadyRemoved() @@ -57,7 +57,7 @@ func onLastEventUpdate(c *Copaing) { c.SetLastEvent() } -func onXPUpdate(c *Copaing) { +func XPUpdate(c *Copaing) { h := c.HourSinceLastEvent() l := Lose(h, c.XP) xp := c.XPAlreadyRemoved() |
