Add Guild.voiceConnection and VoiceChannel.connection

This commit is contained in:
Amish Shah
2016-09-15 15:37:35 +01:00
parent 0405b1a59f
commit 420f2ecdd4
3 changed files with 25 additions and 1 deletions

View File

@@ -661,6 +661,16 @@ class Guild {
}
}
}
/**
* If the client is connected to any voice channel in this guild, this will be the relevant
* VoiceConnection.
* @type {VoiceConnection}
* @readonly
*/
get voiceConnection() {
return this.client.voice.connections.get(this.id);
}
}
module.exports = Guild;