mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-24 13:37:08 +00:00
state: Fix voice state removal condition
This commit addresses issue #220.
This commit is contained in:
parent
7785887719
commit
1a77edb1b1
|
@ -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