dankgrinder 7.72.0 → 7.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/grinder.js +11 -11
- package/package.json +1 -1
package/lib/grinder.js
CHANGED
|
@@ -1389,9 +1389,7 @@ class AccountWorker {
|
|
|
1389
1389
|
|
|
1390
1390
|
// Update Redis with findings
|
|
1391
1391
|
if (redis) {
|
|
1392
|
-
|
|
1393
|
-
await redis.set(`dkg:level:${this.account.id}`, String(currentLevel), 'EX', 2592000);
|
|
1394
|
-
this._level = currentLevel;
|
|
1392
|
+
try {
|
|
1395
1393
|
if (currentLevel > 0) {
|
|
1396
1394
|
await redis.set(`dkg:level:${this.account.id}`, String(currentLevel), 'EX', 2592000);
|
|
1397
1395
|
this._level = currentLevel;
|
|
@@ -1404,17 +1402,19 @@ class AccountWorker {
|
|
|
1404
1402
|
await redis.set(`raw:alert:no-lifesaver:${this.channel?.id}`, '1', 'EX', 86400);
|
|
1405
1403
|
}
|
|
1406
1404
|
}
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1405
|
+
} catch { /* Redis errors non-fatal */ }
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
return { deaths, levelUps, currentLevel, lifesavers: lastLifesaverCount, dmChannelId: dm.id };
|
|
1409
|
+
} catch (e) {
|
|
1410
|
+
lastError = e;
|
|
1411
|
+
if (attempt < maxRetries - 1) {
|
|
1412
|
+
await new Promise(r => setTimeout(r, delays[attempt]));
|
|
1414
1413
|
}
|
|
1415
1414
|
}
|
|
1416
|
-
return { deaths: 0, levelUps: 0, currentLevel: 0, lifesavers: -1 };
|
|
1417
1415
|
}
|
|
1416
|
+
return { deaths: 0, levelUps: 0, currentLevel: 0, lifesavers: -1 };
|
|
1417
|
+
}
|
|
1418
1418
|
|
|
1419
1419
|
// ── Run Single Command ──────────────────────────────────────
|
|
1420
1420
|
// Each modular command handler sends the command, waits for response,
|