mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Fix travis builds
This commit is contained in:
@@ -40,6 +40,7 @@ class DocumentedMember extends DocumentedItem {
|
||||
|
||||
serialize() {
|
||||
super.serialize();
|
||||
console.log('serializing', this);
|
||||
const { id, name, description, memberof, type, access, meta, properties } = this.directData;
|
||||
return {
|
||||
id,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const VoiceWebSocket = require('./VoiceWebSocket');
|
||||
const VoiceUDP = require('./VoiceUDPClient');
|
||||
const VoiceReceiver = require('./receiver/VoiceReceiver');
|
||||
const Constants = require('../../util/Constants');
|
||||
const AudioPlayer = require('./player/AudioPlayer');
|
||||
const EventEmitter = require('events').EventEmitter;
|
||||
@@ -40,6 +39,10 @@ class VoiceConnection extends EventEmitter {
|
||||
|
||||
this.player = new AudioPlayer(this);
|
||||
|
||||
this.player.on('debug', m => {
|
||||
this.emit('debug', `audio player - ${m}`);
|
||||
});
|
||||
|
||||
this.player.on('error', e => {
|
||||
this.emit('warn', e);
|
||||
this.player.cleanup();
|
||||
|
||||
@@ -63,6 +63,7 @@ class VoiceConnectionUDPClient extends EventEmitter {
|
||||
}
|
||||
/**
|
||||
* The port of the discord voice server
|
||||
* @type {number}
|
||||
* @readonly
|
||||
*/
|
||||
get discordPort() {
|
||||
|
||||
@@ -97,7 +97,7 @@ class VoiceWebSocket extends EventEmitter {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
reject(new Error('websocket not open for ' + data));
|
||||
reject(new Error(`voice websocket not open to send ${data}`));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -148,9 +148,8 @@ class VoiceWebSocket extends EventEmitter {
|
||||
|
||||
/**
|
||||
* Called whenever the connection to the WebSocket Server is lost
|
||||
* @param {CloseEvent} event the close event
|
||||
*/
|
||||
onClose(event) {
|
||||
onClose() {
|
||||
// #todo see if the connection is open before reconnecting
|
||||
if (!this.dead) this.client.setTimeout(this.connect.bind(this), this.attempts * 1000);
|
||||
}
|
||||
|
||||
@@ -255,7 +255,6 @@ class StreamDispatcher extends EventEmitter {
|
||||
|
||||
_triggerTerminalState(state, err) {
|
||||
if (this._triggered) return;
|
||||
console.log(state, err);
|
||||
/**
|
||||
* Emitted when the stream wants to give debug information.
|
||||
* @event StreamDispatcher#debug
|
||||
|
||||
@@ -59,6 +59,7 @@ class AudioPlayer extends EventEmitter {
|
||||
dispatcher.on('end', () => this.cleanup(dispatcher.stream, 'disp ended'));
|
||||
dispatcher.on('speaking', value => this.voiceConnection.setSpeaking(value));
|
||||
this.currentDispatcher = dispatcher;
|
||||
dispatcher.on('debug', m => this.emit('debug', `stream dispatch - ${m}`));
|
||||
return dispatcher;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user