From 78113398e57f691fd34fe4949c73d6b089d430cb Mon Sep 17 00:00:00 2001 From: Harmon758 Date: Wed, 25 May 2016 10:04:38 -0500 Subject: [PATCH] Update ChannelID in ChangeChannel --- voice.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/voice.go b/voice.go index 46b3bef..8803a8e 100644 --- a/voice.go +++ b/voice.go @@ -112,6 +112,10 @@ 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 return }