mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 13:32:04 +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) {
|
||||
const promises = this.client.guilds.array().map(g => g.fetchMembers());
|
||||
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();
|
||||
});
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@ exports.Events = {
|
|||
TYPING_STOP: 'typingStop',
|
||||
DISCONNECT: 'disconnect',
|
||||
RECONNECTING: 'reconnecting',
|
||||
ERROR: 'error',
|
||||
WARN: 'warn',
|
||||
DEBUG: 'debug',
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue