mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
Fix VoiceConnection.speaking not emitting
This commit is contained in:
@@ -20,6 +20,7 @@ class VoiceConnection extends EventEmitter {
|
|||||||
|
|
||||||
constructor(pendingConnection) {
|
constructor(pendingConnection) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Voice Manager that instantiated this connection
|
* The Voice Manager that instantiated this connection
|
||||||
* @type {ClientVoiceManager}
|
* @type {ClientVoiceManager}
|
||||||
@@ -77,6 +78,13 @@ class VoiceConnection extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
this.ssrcMap = new Map();
|
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
|
* Object that wraps contains the `ws` and `udp` sockets of this voice connection
|
||||||
* @type {object}
|
* @type {object}
|
||||||
@@ -161,6 +169,7 @@ class VoiceConnection extends EventEmitter {
|
|||||||
* @event VoiceConnection#ready
|
* @event VoiceConnection#ready
|
||||||
*/
|
*/
|
||||||
this.emit('ready');
|
this.emit('ready');
|
||||||
|
this.ready = true;
|
||||||
});
|
});
|
||||||
this.sockets.ws.on('speaking', data => {
|
this.sockets.ws.on('speaking', data => {
|
||||||
const guild = this.channel.guild;
|
const guild = this.channel.guild;
|
||||||
|
|||||||
Reference in New Issue
Block a user