From d7c22e2791738b0ce5252778690c3978b9e4c385 Mon Sep 17 00:00:00 2001 From: yuko1225 Date: Mon, 22 Jul 2019 12:08:31 +0800 Subject: [PATCH] Fix broken IP Discovery in voice connection. (#669) https://github.com/bwmarrin/discordgo/issues/598 https://github.com/bwmarrin/discordgo/issues/668 --- voice.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voice.go b/voice.go index aa630b1..42fa932 100644 --- a/voice.go +++ b/voice.go @@ -593,7 +593,7 @@ func (v *VoiceConnection) udpOpen() (err error) { } // Grab port from position 68 and 69 - port := binary.LittleEndian.Uint16(rb[68:70]) + port := binary.BigEndian.Uint16(rb[68:70]) // Take the data from above and send it back to Discord to finalize // the UDP connection handshake.