voice: move broadcasts to client.voice

This commit is contained in:
Amish Shah
2019-03-23 12:36:53 +00:00
parent 3df56540e2
commit c8225631c9
5 changed files with 53 additions and 23 deletions

View File

@@ -144,12 +144,6 @@ class Client extends BaseClient {
*/
this.readyAt = null;
/**
* Active voice broadcasts that have been created
* @type {VoiceBroadcast[]}
*/
this.broadcasts = [];
if (this.options.messageSweepInterval > 0) {
this.setInterval(this.sweepMessages.bind(this), this.options.messageSweepInterval * 1000);
}
@@ -196,16 +190,6 @@ class Client extends BaseClient {
return this.readyAt ? Date.now() - this.readyAt : null;
}
/**
* Creates a voice broadcast.
* @returns {VoiceBroadcast}
*/
createVoiceBroadcast() {
const broadcast = new VoiceBroadcast(this);
this.broadcasts.push(broadcast);
return broadcast;
}
/**
* Logs the client in, establishing a websocket connection to Discord.
* @param {string} token Token of the account to log in with
@@ -390,7 +374,6 @@ class Client extends BaseClient {
toJSON() {
return super.toJSON({
readyAt: false,
broadcasts: false,
presences: false,
});
}