diff options
| author | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-04-15 18:17:12 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-04-15 18:17:12 +0200 |
| commit | 7d4e050c3f709dc192c1aef66b26221436a0e7f5 (patch) | |
| tree | 770a7ed878e2d5cb47aa8b0085870ccc5ea7630b /xp | |
| parent | 3eab56e3682013510bc0c13963fdd4791f249318 (diff) | |
feat(event): remove copaing on leave
Diffstat (limited to 'xp')
| -rw-r--r-- | xp/events.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xp/events.go b/xp/events.go index 4e1c5e9..4940c0b 100644 --- a/xp/events.go +++ b/xp/events.go @@ -153,3 +153,9 @@ 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) +} |
