Clean up a bunch of promise stuff

This commit is contained in:
Schuyler Cebulskie
2016-10-30 12:47:09 -04:00
parent c42e7a15aa
commit 8306d50bd8
12 changed files with 112 additions and 161 deletions

View File

@@ -264,7 +264,7 @@ class WebSocketManager extends EventEmitter {
this.status = Constants.Status.NEARLY;
if (this.client.options.fetchAllMembers) {
const promises = this.client.guilds.map(g => g.fetchMembers());
Promise.all(promises).then(() => this._emitReady()).catch(e => {
Promise.all(promises).then(() => this._emitReady(), e => {
this.client.emit(Constants.Events.WARN, 'Error in pre-ready guild member fetching');
this.client.emit(Constants.Events.ERROR, e);
this._emitReady();