mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 04:52:22 +00:00
pass on error
This commit is contained in:
parent
92a52460e1
commit
7d750c4680
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue