Spaces:
Runtime error
Runtime error
Update index.js
Browse files
index.js
CHANGED
|
@@ -1394,5 +1394,8 @@ client.login(TOKEN).catch(e => {
|
|
| 1394 |
console.error(`[!] Login Failed:`, e);
|
| 1395 |
console.log("[*] Retrying login with rotated endpoint...");
|
| 1396 |
networkFix.rotateEndpoint();
|
|
|
|
|
|
|
|
|
|
| 1397 |
setTimeout(() => client.login(TOKEN).catch(() => {}), 5000);
|
| 1398 |
});
|
|
|
|
| 1394 |
console.error(`[!] Login Failed:`, e);
|
| 1395 |
console.log("[*] Retrying login with rotated endpoint...");
|
| 1396 |
networkFix.rotateEndpoint();
|
| 1397 |
+
if (client.rest) {
|
| 1398 |
+
client.rest.options.api = `https://${networkFix.getTargetDomain()}/api`;
|
| 1399 |
+
}
|
| 1400 |
setTimeout(() => client.login(TOKEN).catch(() => {}), 5000);
|
| 1401 |
});
|