Browse Source

Update ChannelID in ChangeChannel

Harmon758 8 years ago
parent
commit
78113398e5
1 changed files with 4 additions and 0 deletions
  1. 4 0
      voice.go

+ 4 - 0
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
 }