started working on bug fixes and test scripts

This commit is contained in:
Amish Shah
2015-12-04 20:30:11 +00:00
parent fdf1107404
commit ac2398e47c
30 changed files with 209 additions and 40 deletions

View File

@@ -242,7 +242,7 @@ var InternalClient = (function () {
return _superagent2["default"].post(_Constants.Endpoints.SERVERS).set("authorization", this.token).send({ name: name, region: region }).end().then(function (res) {
// valid server, wait until it is cached
return waitFor(function () {
return _this4.servers.get("id", res.body.guild.id);
return _this4.servers.get("id", res.body.id);
});
});
};
@@ -521,8 +521,9 @@ var InternalClient = (function () {
var channel;
if (res.body.type === "text") {
channel = new _StructuresTextChannel2["default"](res.body, _this16.client, server);
} else {
channel = new _StructuresVoiceChannel2["default"](res.body, _this16.client, server);
}
channel = new _StructuresVoiceChannel2["default"](res.body, _this16.client, server);
return server.channels.add(_this16.channels.add(channel));
});
};
@@ -1011,7 +1012,6 @@ var InternalClient = (function () {
};
this.websocket.onmessage = function (e) {
if (e.type === "Binary") {
if (!zlib) zlib = require("zlib");
e.data = zlib.inflateSync(e.data).toString();
@@ -1027,7 +1027,6 @@ var InternalClient = (function () {
}
client.emit("raw", packet);
switch (packet.t) {
case _Constants.PacketType.READY:
@@ -1416,4 +1415,4 @@ var InternalClient = (function () {
})();
exports["default"] = InternalClient;
module.exports = exports["default"];
module.exports = exports["default"];