Multi voice connections across servers working

This commit is contained in:
Nicholas Tay
2016-04-05 11:25:24 +10:00
parent cfc1f7f6ae
commit a15b8e56c7
4 changed files with 292 additions and 204 deletions

View File

@@ -702,7 +702,7 @@ var Client = (function (_EventEmitter) {
return this.internal.moveMember(user, channel).then(dataCallback(callback), errorCallback(callback));
};
// def muteMember
Client.prototype.muteMember = function muteMember(user, server) {
@@ -710,7 +710,7 @@ var Client = (function (_EventEmitter) {
return this.internal.muteMember(user, server).then(dataCallback(callback), errorCallback(callback));
};
// def unmuteMember
Client.prototype.unmuteMember = function unmuteMember(user, server) {
@@ -718,7 +718,7 @@ var Client = (function (_EventEmitter) {
return this.internal.unmuteMember(user, server).then(dataCallback(callback), errorCallback(callback));
};
// def deafenMember
Client.prototype.deafenMember = function deafenMember(user, server) {
@@ -726,7 +726,7 @@ var Client = (function (_EventEmitter) {
return this.internal.deafenMember(user, server).then(dataCallback(callback), errorCallback(callback));
};
// def undeafenMember
Client.prototype.undeafenMember = function undeafenMember(user, server) {
@@ -979,10 +979,10 @@ var Client = (function (_EventEmitter) {
// def leaveVoiceChannel
Client.prototype.leaveVoiceChannel = function leaveVoiceChannel() {
var callback = arguments.length <= 0 || arguments[0] === undefined ? function () /*err, {}*/{} : arguments[0];
Client.prototype.leaveVoiceChannel = function leaveVoiceChannel(chann) {
var callback = arguments.length <= 1 || arguments[1] === undefined ? function () /*err, {}*/{} : arguments[1];
return this.internal.leaveVoiceChannel().then(dataCallback(callback), errorCallback(callback));
return this.internal.leaveVoiceChannel(chann).then(dataCallback(callback), errorCallback(callback));
};
// def addFriend
@@ -1190,13 +1190,13 @@ var Client = (function (_EventEmitter) {
}
/**
* The active voice connection of the Client, or null if not applicable. Only available after `ready` event has been emitted.
* @type {VoiceConnection|null} the voice connection (if any).
* A cache of active voice connection of the Client, or null if not applicable. Only available after `ready` event has been emitted.
* @type {Cache<VoiceConnection>} a Cache of Voice Connections
*/
}, {
key: "voiceConnection",
key: "voiceConnections",
get: function get() {
return this.internal.voiceConnection;
return this.internal.voiceConnections;
}
/**