From 56e37c002b2fac14e1b07b2a26bc32c99ea87ece Mon Sep 17 00:00:00 2001 From: abalabahaha Date: Mon, 15 Nov 2021 13:35:48 +0000 Subject: [PATCH] fix(voice): properly initialize UDP socket for receive Discord doesn't start sending voice data until we send them something --- lib/voice/VoiceConnection.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/voice/VoiceConnection.js b/lib/voice/VoiceConnection.js index 4cce5299f..b2b004ac2 100644 --- a/lib/voice/VoiceConnection.js +++ b/lib/voice/VoiceConnection.js @@ -275,6 +275,8 @@ class VoiceConnection extends EventEmitter { this.connecting = false; this.reconnecting = false; this.ready = true; + // Send audio to properly establish the socket (e.g. for voice receive) + this.sendAudioFrame(SILENCE_FRAME); /** * Fired when the voice connection turns ready * @event VoiceConnection#ready