Minor fixes

This commit is contained in:
hydrabolt
2015-11-07 21:24:56 +00:00
parent fc31df3fcf
commit ae75c49621
9 changed files with 69 additions and 27 deletions

View File

@@ -76,7 +76,10 @@ var InternalClient = (function () {
token = data.d.token;
endpoint = data.d.endpoint;
self.voiceConnections[channel] = new VoiceConnection(channel, self.client, session, token, server, endpoint);
var chan = self.voiceConnections[channel] = new VoiceConnection(channel, self.client, session, token, server, endpoint);
chan.on("ready", resolve);
chan.on("error", reject);
}
if (fired >= 2) {
self.websocket.removeListener('message', check);
@@ -774,7 +777,6 @@ var InternalClient = (function () {
}
request.put(Endpoints.CHANNEL_PERMISSIONS(channel.id) + "/" + data.id).set("authorization", self.token).send(data).end(function (err) {
console.log(err);
if (err) {
reject(err);
} else {