mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
start work on voice manager
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -5,6 +5,7 @@ const RESTManager = require('./rest/RESTManager');
|
|||||||
const ClientDataManager = require('./ClientDataManager');
|
const ClientDataManager = require('./ClientDataManager');
|
||||||
const ClientManager = require('./ClientManager');
|
const ClientManager = require('./ClientManager');
|
||||||
const ClientDataResolver = require('./ClientDataResolver');
|
const ClientDataResolver = require('./ClientDataResolver');
|
||||||
|
const ClientVoiceManager = require('./ClientVoiceManager');
|
||||||
const WebSocketManager = require('./websocket/WebSocketManager');
|
const WebSocketManager = require('./websocket/WebSocketManager');
|
||||||
const ActionsManager = require('./actions/ActionsManager');
|
const ActionsManager = require('./actions/ActionsManager');
|
||||||
const Collection = require('../util/Collection');
|
const Collection = require('../util/Collection');
|
||||||
@@ -58,7 +59,12 @@ class Client extends EventEmitter {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.actions = new ActionsManager(this);
|
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
|
* A Collection of the Client's stored users
|
||||||
* @type {Collection<String, User>}
|
* @type {Collection<String, User>}
|
||||||
|
|||||||
29
src/client/ClientVoiceManager.js
Normal file
29
src/client/ClientVoiceManager.js
Normal 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;
|
||||||
Reference in New Issue
Block a user