start work on voice manager

This commit is contained in:
Amish Shah
2016-08-23 15:48:59 +01:00
parent c8be80abd7
commit f38aff7523
3 changed files with 37 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -5,6 +5,7 @@ const RESTManager = require('./rest/RESTManager');
const ClientDataManager = require('./ClientDataManager');
const ClientManager = require('./ClientManager');
const ClientDataResolver = require('./ClientDataResolver');
const ClientVoiceManager = require('./ClientVoiceManager');
const WebSocketManager = require('./websocket/WebSocketManager');
const ActionsManager = require('./actions/ActionsManager');
const Collection = require('../util/Collection');
@@ -58,7 +59,12 @@ class Client extends EventEmitter {
* @private
*/
this.actions = new ActionsManager(this);
/**
* The Voice Manager of the Client
* @type {ClientVoiceManager}
* @private
*/
this.voice = new ClientVoiceManager(this);
/**
* A Collection of the Client's stored users
* @type {Collection<String, User>}

View File

@@ -0,0 +1,29 @@
const Collection = require('../util/Collection');
/**
* Manages all the voice stuff for the Client
* @private
*/
class ClientVoiceManager {
constructor(client) {
/**
* The client that instantiated this voice manager
*/
this.client = client;
/**
* A collection mapping connection IDs to the Connection objects
*/
this.connections = new Collection();
}
/**
* Sets up a request to join a voice channel
* @param {VoiceChannel} channel the voice channel to join
* @returns {null}
*/
joinChannel(channel) {
return channel;
}
}
module.exports = ClientVoiceManager;