websocket cleanup (#1346)

* websocket cleanup

* resume event

* Update Resumed.js

* Update WebSocketManager.js
This commit is contained in:
Gus Caplan
2017-04-10 13:02:17 -05:00
committed by Crawl
parent 8436cbe8b1
commit 0a56fa0aae
8 changed files with 167 additions and 79 deletions

View File

@@ -39,15 +39,8 @@ class RESTMethods {
return this.rest.makeRequest('post', Endpoints.logout, true, {});
}
getGateway() {
return this.rest.makeRequest('get', Endpoints.gateway, true).then(res => {
this.client.ws.gateway = `${res.url}/?v=${this.client.options.ws.version}`;
return this.client.ws.gateway;
});
}
getBotGateway() {
return this.rest.makeRequest('get', Endpoints.gateway.bot, true);
getGateway(bot = false) {
return this.rest.makeRequest('get', bot ? Endpoints.gateway.bot : Endpoints.gateway, true);
}
fetchVoiceRegions(guildID) {