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:
parent
c8e7eff04e
commit
ba49bff80a
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue