mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
Add voice websocket handling
This commit is contained in:
19
src/client/voice/VoiceConnection.js
Normal file
19
src/client/voice/VoiceConnection.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const VoiceConnectionWebSocket = require('./VoiceConnectionWebSocket');
|
||||
const EventEmitter = require('events').EventEmitter;
|
||||
|
||||
class VoiceConnection extends EventEmitter {
|
||||
constructor(manager, serverID, token, sessionID, endpoint) {
|
||||
super();
|
||||
this.manager = manager;
|
||||
this.websocket = new VoiceConnectionWebSocket(this, serverID, token, sessionID, endpoint);
|
||||
this.bindListeners();
|
||||
}
|
||||
|
||||
bindListeners() {
|
||||
this.websocket.on('ready-for-udp', data => {
|
||||
console.log(data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = VoiceConnection;
|
||||
Reference in New Issue
Block a user