mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
pass on error
This commit is contained in:
@@ -287,7 +287,10 @@ class Client extends EventEmitter {
|
||||
if (typeof token !== 'string') throw new Error('TOKEN_INVALID');
|
||||
token = token.replace(/^Bot\s*/i, '');
|
||||
this.manager.connectToWebSocket(token, resolve, reject);
|
||||
}).catch(() => this.destroy());
|
||||
}).catch(e => {
|
||||
this.destroy();
|
||||
return Promise.reject(e);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user