1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-30 18:53:30 +00:00

state: Fix voice state removal condition

This commit addresses issue #220.
This commit is contained in:
diamondburned 2021-06-08 02:53:54 -07:00
parent c8e7eff04e
commit ba49bff80a

View file

@ -327,7 +327,7 @@ func (s *State) onEvent(iface interface{}) {
case *gateway.VoiceStateUpdateEvent:
vs := &ev.VoiceState
if vs.ChannelID == 0 {
if !vs.ChannelID.IsValid() {
if err := s.Cabinet.VoiceStateRemove(vs.GuildID, vs.UserID); err != nil {
s.stateErr(err, "failed to remove voice state from state")
}