mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23:31 +01:00
Clean up a bunch of new voice stuff
This commit is contained in:
@@ -129,12 +129,8 @@ class VoiceConnection extends EventEmitter {
|
||||
* @private
|
||||
*/
|
||||
connect() {
|
||||
if (this.sockets.ws) {
|
||||
throw new Error('There is already an existing WebSocket connection!');
|
||||
}
|
||||
if (this.sockets.udp) {
|
||||
throw new Error('There is already an existing UDP connection!');
|
||||
}
|
||||
if (this.sockets.ws) throw new Error('There is already an existing WebSocket connection.');
|
||||
if (this.sockets.udp) throw new Error('There is already an existing UDP connection.');
|
||||
this.sockets.ws = new VoiceWebSocket(this);
|
||||
this.sockets.udp = new VoiceUDP(this);
|
||||
this.sockets.ws.on('error', e => this.emit('error', e));
|
||||
@@ -260,7 +256,6 @@ class VoiceConnection extends EventEmitter {
|
||||
this.receivers.push(receiver);
|
||||
return receiver;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = VoiceConnection;
|
||||
|
||||
Reference in New Issue
Block a user