diff --git a/voice.go b/voice.go index 46b3bef..a16a04f 100644 --- a/voice.go +++ b/voice.go @@ -112,6 +112,12 @@ func (v *VoiceConnection) ChangeChannel(channelID string, mute, deaf bool) (err v.wsMutex.Lock() err = v.session.wsConn.WriteJSON(data) v.wsMutex.Unlock() + if err != nil { + return + } + v.ChannelID = channelID + v.deaf = deaf + v.mute = mute return }