Merge pull request #1 from anhgelus/feat/xp-reducer
[Feat] Add XP reducer
This commit is contained in:
commit
6b595b8b11
8 changed files with 303 additions and 9 deletions
|
@ -31,6 +31,7 @@ func OnMessage(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|||
return
|
||||
}
|
||||
c := GetCopaing(m.Author.ID, m.GuildID)
|
||||
LastEventUpdate(s, c)
|
||||
// add xp
|
||||
trimmed := utils.TrimMessage(strings.ToLower(m.Content))
|
||||
m.Member.User = m.Author
|
||||
|
@ -67,6 +68,7 @@ func OnVoiceUpdate(s *discordgo.Session, e *discordgo.VoiceStateUpdate) {
|
|||
if e.Member.User.Bot {
|
||||
return
|
||||
}
|
||||
LastEventUpdate(s, GetCopaing(e.UserID, e.GuildID))
|
||||
cfg := config.GetGuildConfig(e.GuildID)
|
||||
if cfg.IsDisabled(e.ChannelID) {
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue