Wait for the websocket event when creating a guild (#1524)

* Wait for the websocket event when creating a guild

* using TOOK_TOO_LONG error

* resolve after timeout with an unavailable guild object
This commit is contained in:
SpaceEEC
2017-06-23 21:49:56 +02:00
committed by Amish Shah
parent 66cc5b2b53
commit 4f23822264
2 changed files with 23 additions and 4 deletions

View File

@@ -68,8 +68,8 @@ class Guild {
*/
this.id = data.id;
} else {
this.available = true;
this.setup(data);
if (!data.channels) this.available = false;
}
}