diff options
| author | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-11-25 09:35:44 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-11-25 09:35:44 +0100 |
| commit | 50256de97095f619c5a36da6e52eb149d6aceb0e (patch) | |
| tree | a64af1449bfcc29ddbbcfa62cd941b676f998aa2 /xp/events.go | |
| parent | f15c0678b7e0cd3686b37f364cf4c8781a00fcd5 (diff) | |
refactor(reducer): iterate over users in database
and possible fix of 'shadow' users
Diffstat (limited to 'xp/events.go')
| -rw-r--r-- | xp/events.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xp/events.go b/xp/events.go index 90af121..23d4b4b 100644 --- a/xp/events.go +++ b/xp/events.go @@ -168,5 +168,5 @@ func onDisconnect(s *discordgo.Session, e *discordgo.VoiceStateUpdate, client *r func OnLeave(_ *discordgo.Session, e *discordgo.GuildMemberRemove) { utils.SendDebug("Leave event", "user_id", e.User.ID) c := GetCopaing(e.User.ID, e.GuildID) - gokord.DB.Delete(c) + gokord.DB.Where("guild_id = ?", e.GuildID).Delete(c) } |
