fix: Cannot destructure property 'url' of '(intermediate value)' as it is undefined.
This commit is contained in:
parent
00418e59be
commit
3397d8da71
@ -140,13 +140,14 @@ class WebSocketManager extends EventEmitter {
|
||||
*/
|
||||
|
||||
let gatewayURL = 'wss://gateway.discord.gg';
|
||||
const { url } = await this.client.api.gateway
|
||||
.get({ auth: false })
|
||||
const { url } = await this.client.api.gateway.get({ auth: false }).catch(() => ({ url: gatewayURL }));
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
/*
|
||||
.catch(error => {
|
||||
// Never throw error :v
|
||||
// throw error.httpStatus === 401 ? invalidToken : error;
|
||||
});
|
||||
*/
|
||||
if (url) gatewayURL = url;
|
||||
const recommendedShards = 1;
|
||||
const sessionStartLimit = {
|
||||
|
Loading…
Reference in New Issue
Block a user