Ignore setSpeaking requests when VC isn't connected (#1638)

This commit is contained in:
aemino
2017-07-01 02:14:41 -07:00
committed by Amish Shah
parent 5ecd5f7d69
commit 62537b7deb
2 changed files with 3 additions and 0 deletions

View File

@@ -133,6 +133,7 @@ class VoiceConnection extends EventEmitter {
*/
setSpeaking(value) {
if (this.speaking === value) return;
if (this.status !== Constants.VoiceStatus.CONNECTED) return;
this.speaking = value;
this.sockets.ws.sendPacket({
op: Constants.VoiceOPCodes.SPEAKING,