From ce1e3d20847ea226839a4cba15dcefa875086d12 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 29 Apr 2019 19:13:41 +0100 Subject: [PATCH] feat(VoiceConnection): add .voice --- src/client/voice/VoiceConnection.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 727f21968..b532d0c5e 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -166,6 +166,14 @@ class VoiceConnection extends EventEmitter { }); } + /** + * The voice state of this connection + * @type {VoiceState} + */ + get voice() { + return this.channel.guild.voiceStates.get(this.client.user.id); + } + /** * Sends a request to the main gateway to join a voice channel. * @param {Object} [options] The options to provide