fix: TOKEN_INVALID error not thrown at login with invalid token (#7630)

This commit is contained in:
MateoDeveloper
2022-03-24 14:59:30 -05:00
committed by GitHub
parent c684ac55e1
commit cd79bef254

View File

@@ -136,7 +136,7 @@ class WebSocketManager extends EventEmitter {
shards: recommendedShards,
session_start_limit: sessionStartLimit,
} = await this.client.rest.get(Routes.gatewayBot()).catch(error => {
throw error.httpStatus === 401 ? invalidToken : error;
throw error.status === 401 ? invalidToken : error;
});
const { total, remaining } = sessionStartLimit;