diff --git a/src/client/voice/player/AudioPlayer.js b/src/client/voice/player/AudioPlayer.js index b5c338675..96c6c24ae 100644 --- a/src/client/voice/player/AudioPlayer.js +++ b/src/client/voice/player/AudioPlayer.js @@ -3,13 +3,26 @@ const OpusEncoders = require('../opus/OpusEngineList'); const EventEmitter = require('events').EventEmitter; const StreamDispatcher = require('../dispatcher/StreamDispatcher'); +/** + * Represents the Audio Player of a Voice Connection + * @extends {EventEmitter} + * @private + */ class AudioPlayer extends EventEmitter { constructor(voiceConnection) { super(); + /** + * The voice connection the player belongs to + * @type {VoiceConnection} + */ this.voiceConnection = voiceConnection; this.audioToPCM = new (PCMConverters.fetch())(); this.opusEncoder = OpusEncoders.fetch(); this.currentConverter = null; + /** + * The current stream dispatcher, if a stream is being played + * @type {StreamDispatcher} + */ this.dispatcher = null; this.audioToPCM.on('error', e => this.emit('error', e)); this.streamingData = { diff --git a/test/random.js b/test/random.js index efc8662f6..0c9776ee4 100644 --- a/test/random.js +++ b/test/random.js @@ -4,7 +4,7 @@ const Discord = require('../'); const request = require('superagent'); const fs = require('fs'); -const client = new Discord.Client({ fetchAllMembers: false, apiRequestMethod: 'sequential' }); +const client = new Discord.Client({ fetchAllMembers: false, apiRequestMethod: 'burst' }); const { email, password, token, usertoken, song } = require('./auth.json');