mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
voice: use getters where possible
This commit is contained in:
@@ -36,12 +36,6 @@ class VoiceConnection extends EventEmitter {
|
||||
*/
|
||||
this.voiceManager = voiceManager;
|
||||
|
||||
/**
|
||||
* The client that instantiated this connection
|
||||
* @type {Client}
|
||||
*/
|
||||
this.client = voiceManager.client;
|
||||
|
||||
/**
|
||||
* The voice channel this connection is currently serving
|
||||
* @type {VoiceChannel}
|
||||
@@ -116,6 +110,14 @@ class VoiceConnection extends EventEmitter {
|
||||
this.authenticate();
|
||||
}
|
||||
|
||||
/**
|
||||
* The client that instantiated this connection
|
||||
* @type {Client}
|
||||
*/
|
||||
get client() {
|
||||
return this.voiceManager.client;
|
||||
}
|
||||
|
||||
/**
|
||||
* The current stream dispatcher (if any)
|
||||
* @type {?StreamDispatcher}
|
||||
|
||||
Reference in New Issue
Block a user