Brozy123 commited on
Commit
7dc7be2
·
verified ·
1 Parent(s): 58cf80d

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +4 -2
index.js CHANGED
@@ -11,6 +11,8 @@ const { createProfileAttachment } = require('./profileRenderer');
11
  // Apply network fixes early
12
  networkFix.applyAdvancedFixes();
13
 
 
 
14
  process.on('unhandledRejection', (reason, promise) => {
15
  console.error('[!] Unhandled Rejection:', reason);
16
  });
@@ -1403,14 +1405,14 @@ client.on('error', (e) => {
1403
 
1404
  console.log("[*] Attempting Discord login...");
1405
 
1406
- // Watchdog: If not logged in within 60 seconds, rotate and restart
1407
  const loginWatchdog = setTimeout(() => {
1408
  if (!client.isReady()) {
1409
  console.log(`[!] Login Watchdog: Connection hanging on ${networkFix.getTargetDomain()}. Rotating and restarting...`);
1410
  networkFix.rotateEndpoint();
1411
  process.exit(1);
1412
  }
1413
- }, 60000);
1414
 
1415
  client.login(TOKEN).then(() => {
1416
  clearTimeout(loginWatchdog);
 
11
  // Apply network fixes early
12
  networkFix.applyAdvancedFixes();
13
 
14
+ console.log(`[SYSTEM] Starting FriendlyBot v4.0 (Watchdog Relaxed: ${new Date().toISOString()})`);
15
+
16
  process.on('unhandledRejection', (reason, promise) => {
17
  console.error('[!] Unhandled Rejection:', reason);
18
  });
 
1405
 
1406
  console.log("[*] Attempting Discord login...");
1407
 
1408
+ // Watchdog: If not logged in within 5 minutes, rotate and restart
1409
  const loginWatchdog = setTimeout(() => {
1410
  if (!client.isReady()) {
1411
  console.log(`[!] Login Watchdog: Connection hanging on ${networkFix.getTargetDomain()}. Rotating and restarting...`);
1412
  networkFix.rotateEndpoint();
1413
  process.exit(1);
1414
  }
1415
+ }, 300000);
1416
 
1417
  client.login(TOKEN).then(() => {
1418
  clearTimeout(loginWatchdog);