mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
started working on bug fixes and test scripts
This commit is contained in:
@@ -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"];
|
||||
Reference in New Issue
Block a user