some voice docs

This commit is contained in:
Amish Shah
2016-10-26 14:44:19 +01:00
parent 968883ec35
commit 26de908cfd
2 changed files with 14 additions and 1 deletions

View File

@@ -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 = {

View File

@@ -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');