mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 04:53:30 +01:00
Fix Hyper's error and make it more useful
This commit is contained in:
@@ -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',
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user