From 2ebf8bdb10b33f4c79ba1fd694a75e128d368aa0 Mon Sep 17 00:00:00 2001 From: Bruce Marriner Date: Thu, 7 Jul 2016 21:07:26 -0500 Subject: [PATCH] Removed unneeded code. --- voice.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/voice.go b/voice.go index 601d2b9..6e41769 100644 --- a/voice.go +++ b/voice.go @@ -831,20 +831,13 @@ func (v *VoiceConnection) reconnect() { v.log(LogInformational, "trying to reconnect to channel %s", v.ChannelID) - // Below is required because ChannelVoiceJoin checks the GuildID - // to decide if we should change channels or open a new connection. - // TODO: Maybe find a better method. - gID := v.GuildID - v.GuildID = "" - v.sessionID = "" - _, err := v.session.ChannelVoiceJoin(gID, v.ChannelID, v.mute, v.deaf) if err == nil { v.log(LogInformational, "successfully reconnected to channel %s", v.ChannelID) return } - // if the quick reconnect above didn't work lets just send a disconnect + // if the reconnect above didn't work lets just send a disconnect // packet to reset things. // Send a OP4 with a nil channel to disconnect data := voiceChannelJoinOp{4, voiceChannelJoinData{&v.GuildID, nil, true, true}}