From 4e6b632d2339151c50ed1f190c8524ca7f0fe8b7 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 27 Oct 2016 20:51:19 -0400 Subject: [PATCH] Fix VoiceConnection.speaking not emitting --- src/client/voice/VoiceConnection.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index afb405789..cac004f80 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -20,6 +20,7 @@ class VoiceConnection extends EventEmitter { constructor(pendingConnection) { super(); + /** * The Voice Manager that instantiated this connection * @type {ClientVoiceManager} @@ -77,6 +78,13 @@ class VoiceConnection extends EventEmitter { */ this.ssrcMap = new Map(); + /** + * Whether this connection is ready + * @type {boolean} + * @private + */ + this.ready = false; + /** * Object that wraps contains the `ws` and `udp` sockets of this voice connection * @type {object} @@ -161,6 +169,7 @@ class VoiceConnection extends EventEmitter { * @event VoiceConnection#ready */ this.emit('ready'); + this.ready = true; }); this.sockets.ws.on('speaking', data => { const guild = this.channel.guild;