refactor(xp): use own trim function

for next gokord update
This commit is contained in:
Anhgelus Morhtuuzh 2025-08-04 13:21:32 +02:00
parent 977c818328
commit cf2093095e
Signed by: anhgelus
GPG key ID: 617773CACE89052C
2 changed files with 15 additions and 1 deletions

View file

@ -31,7 +31,7 @@ func OnMessage(s *discordgo.Session, m *discordgo.MessageCreate) {
}
c := user.GetCopaing(m.Author.ID, m.GuildID)
// add exp
trimmed := utils.TrimMessage(strings.ToLower(m.Content))
trimmed := exp.TrimMessage(strings.ToLower(m.Content))
m.Member.User = m.Author
m.Member.GuildID = m.GuildID
xp := min(exp.MessageXP(uint(len(trimmed)), exp.CalcDiversity(trimmed)), MaxXpPerMessage)