mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 12:40:50 +00:00
Fix Hyper's error and make it more useful
This commit is contained in:
parent
0b5ef296cb
commit
13aae621b8
2 changed files with 3 additions and 1 deletions
|
|
@ -265,7 +265,8 @@ class WebSocketManager extends EventEmitter {
|
||||||
if (this.client.options.fetchAllMembers) {
|
if (this.client.options.fetchAllMembers) {
|
||||||
const promises = this.client.guilds.array().map(g => g.fetchMembers());
|
const promises = this.client.guilds.array().map(g => g.fetchMembers());
|
||||||
Promise.all(promises).then(() => this._emitReady()).catch(e => {
|
Promise.all(promises).then(() => this._emitReady()).catch(e => {
|
||||||
this.client.emit(Constants.Event.WARN, `Error on pre-ready guild member fetching - ${e}`);
|
this.client.emit(Constants.Events.WARN, 'Error in pre-ready guild member fetching');
|
||||||
|
this.client.emit(Constants.Events.ERROR, e);
|
||||||
this._emitReady();
|
this._emitReady();
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,7 @@ exports.Events = {
|
||||||
TYPING_STOP: 'typingStop',
|
TYPING_STOP: 'typingStop',
|
||||||
DISCONNECT: 'disconnect',
|
DISCONNECT: 'disconnect',
|
||||||
RECONNECTING: 'reconnecting',
|
RECONNECTING: 'reconnecting',
|
||||||
|
ERROR: 'error',
|
||||||
WARN: 'warn',
|
WARN: 'warn',
|
||||||
DEBUG: 'debug',
|
DEBUG: 'debug',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue