mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +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');
|
if (typeof token !== 'string') throw new Error('TOKEN_INVALID');
|
||||||
token = token.replace(/^Bot\s*/i, '');
|
token = token.replace(/^Bot\s*/i, '');
|
||||||
this.manager.connectToWebSocket(token, resolve, reject);
|
this.manager.connectToWebSocket(token, resolve, reject);
|
||||||
}).catch(() => this.destroy());
|
}).catch(e => {
|
||||||
|
this.destroy();
|
||||||
|
return Promise.reject(e);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user