dankgrinder 8.92.0 → 8.94.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 CHANGED
@@ -1544,9 +1544,11 @@ class AccountWorker {
1544
1544
  return;
1545
1545
  }
1546
1546
 
1547
- // Level-locked detection — "not unlocked" means this command needs quests
1548
- if (resultLower.includes('not unlocked') || resultLower.includes('complete tasks to unlock')) {
1549
- const lvMatch = result.match(/level\s*(\d+)/i);
1547
+ // Level-locked detection — check rawLogger (CV2/embed text) NOT just content
1548
+ const raw = rawLogger.getLastRaw(this.channel?.id);
1549
+ const rawAllText = (raw?.content || '') + '\n' + (raw?.cv2Text || '') + '\n' + (raw?.embedText || '');
1550
+ if (rawAllText.toLowerCase().includes('not unlocked')) {
1551
+ const lvMatch = rawAllText.match(/level\s*(\d+)/i);
1550
1552
  if (lvMatch) {
1551
1553
  const targetLv = parseInt(lvMatch[1]);
1552
1554
  cmdResult.levelLocked = targetLv;
@@ -1888,7 +1890,8 @@ class AccountWorker {
1888
1890
  { cmd: 'tidy', times: 2 },
1889
1891
  ],
1890
1892
  3: [
1891
- { cmd: 'work shift', times: 1 },
1893
+ { cmd: 'work apply', times: 1 },
1894
+ { cmd: 'work shift', times: 1 },
1892
1895
  { cmd: 'shop sell common coin 1', times: 2 },
1893
1896
  ],
1894
1897
  5: [
package/lib/rawLogger.js CHANGED
@@ -583,6 +583,12 @@ function attachDmLogger(client, opts = {}) {
583
583
  pipe.exec().catch(() => {});
584
584
  }
585
585
 
586
+ // Store to channelLast so getLastRaw(channelId) works for DM messages.
587
+ // This is critical: attachRawLogger's channel filter may miss on first login
588
+ // (this.channel not yet set), but attachDmLogger always fires for DMs.
589
+ const stored = store(d, 'CREATE');
590
+ if (stored && stored.then) stored.catch(() => {});
591
+
586
592
  // Emit to listeners
587
593
  if (dmEvent) {
588
594
  for (const fn of dmListeners) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dankgrinder",
3
- "version": "8.92.0",
3
+ "version": "8.94.0",
4
4
  "description": "Dank Memer automation engine — grind coins while you sleep",
5
5
  "bin": {
6
6
  "dankgrinder": "bin/dankgrinder.js"