mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
some voice docs
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user