Added support for server unavailability

it happened just now RIP discord server </3
This commit is contained in:
hydrabolt
2015-09-27 17:05:17 +01:00
parent 5fa7bace10
commit 223753408c
3 changed files with 20 additions and 0 deletions

View File

@@ -1048,6 +1048,12 @@ class Client {
var self = this;
var server = this.getServer("id", data.id);
if(data.unavailable){
self.trigger("unavailable", data);
self.debug("Server ID" + + " has been marked unavailable by Discord. It was not cached.");
return;
}
if (!server) {
server = new Server(data, this);
this.serverCache.push(server);