From 78113398e57f691fd34fe4949c73d6b089d430cb Mon Sep 17 00:00:00 2001 From: Harmon758 Date: Wed, 25 May 2016 10:04:38 -0500 Subject: [PATCH 1/2] 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 } From 2175a62cad7e3b7dc4f63231af6a9d8612f569c5 Mon Sep 17 00:00:00 2001 From: Harmon758 Date: Wed, 25 May 2016 10:41:18 -0500 Subject: [PATCH 2/2] Update deaf and mute as well --- voice.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/voice.go b/voice.go index 8803a8e..a16a04f 100644 --- a/voice.go +++ b/voice.go @@ -116,6 +116,8 @@ func (v *VoiceConnection) ChangeChannel(channelID string, mute, deaf bool) (err return } v.ChannelID = channelID + v.deaf = deaf + v.mute = mute return }