dankgrinder 6.16.0 → 6.17.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
@@ -3171,16 +3171,16 @@ async function start(apiKey, apiUrl) {
3171
3171
  let balDone = 0;
3172
3172
  const balProgressInterval = setInterval(() => {
3173
3173
  const spin = BRAILLE_SPIN[Math.floor(Date.now() / 80) % BRAILLE_SPIN.length];
3174
- process.stdout.write(`\r ${rgb(34, 211, 238)}${spin}${c.reset} ${c.dim}Balance...${c.reset} ${c.bold}${rgb(52, 211, 153)}${balDone}${c.reset}${c.dim}/${c.reset}${c.white}${total}${c.reset} `);
3174
+ process.stdout.write(`\r ${rgb(34, 211, 238)}${spin}${c.reset} ${c.dim}Balance...${c.reset} ${c.bold}${rgb(52, 211, 153)}${balDone}${c.reset}${c.dim}/${c.reset}${c.white}${activeWorkers.length}${c.reset} `);
3175
3175
  }, 80);
3176
3176
 
3177
- // Run sequentially parallel causes CV2 text to be empty (raw logger timing)
3178
- for (const w of activeWorkers) {
3177
+ // Run in parallel
3178
+ await Promise.all(activeWorkers.map(async w => {
3179
3179
  try {
3180
3180
  await w.checkBalance();
3181
+ balDone++;
3181
3182
  } catch {}
3182
- balDone++;
3183
- }
3183
+ }));
3184
3184
 
3185
3185
  clearInterval(balProgressInterval);
3186
3186
  process.stdout.write(`\r${c.clearLine}`);
@@ -3213,6 +3213,9 @@ async function start(apiKey, apiUrl) {
3213
3213
  if (dm.deaths > 0) dmDeaths += dm.deaths;
3214
3214
  if (dm.levelUps > 0) dmLevelUps += dm.levelUps;
3215
3215
  if (dm.lifesavers === 0) dmNoLs.push(w.username);
3216
+ // Store level and lifesaver for dashboard
3217
+ if (dm.currentLevel > 0) w._level = dm.currentLevel;
3218
+ if (dm.lifesavers >= 0) w._lifesavers = dm.lifesavers;
3216
3219
  const parts = [];
3217
3220
  if (dm.currentLevel > 0) parts.push(`Lv${dm.currentLevel}`);
3218
3221
  if (dm.deaths > 0) parts.push(`${rgb(239, 68, 68)}${dm.deaths} deaths${c.reset}`);
@@ -3227,6 +3230,15 @@ async function start(apiKey, apiUrl) {
3227
3230
  }
3228
3231
  if (dmNoLs.length > 0) {
3229
3232
  console.log(` ${rgb(239, 68, 68)}⚠${c.reset} ${c.bold}${c.red}DM confirms 0 lifesavers:${c.reset} ${dmNoLs.join(', ')}`);
3233
+ // Set Redis keys to block crime/search
3234
+ for (const w of activeWorkers) {
3235
+ if (dmNoLs.includes(w.username) && redis) {
3236
+ try {
3237
+ await redis.set(`dkg:lifesavers:${w.account.id}`, '0', 'EX', 86400);
3238
+ await redis.set(`raw:alert:no-lifesaver:${w.channel?.id}`, '1', 'EX', 86400);
3239
+ } catch {}
3240
+ }
3241
+ }
3230
3242
  }
3231
3243
  console.log(` ${rgb(52, 211, 153)}✓${c.reset} ${c.bold}DM check${c.reset} ${c.dim}${dmDeaths} deaths, ${dmLevelUps} level-ups found${c.reset}`);
3232
3244
  console.log('');
package/lib/rawLogger.js CHANGED
@@ -152,6 +152,9 @@ function detectCommand(d) {
152
152
  if (cv2Text.includes('fishing') || cv2Text.includes('fisherfolk')) return 'fish';
153
153
  if (cv2Text.includes('deposit') || cv2Text.includes('bank account')) return 'deposit';
154
154
  if (cv2Text.includes('begging') || cv2Text.includes('imagine begging')) return 'beg';
155
+ if (cv2Text.includes('hunting') || cv2Text.includes('went hunting') || cv2Text.includes('hunting rifle')) return 'hunt';
156
+ if (cv2Text.includes('digging') || cv2Text.includes('found nothing while') || cv2Text.includes('you dig')) return 'dig';
157
+ if (cv2Text.includes('great work') || cv2Text.includes('for your shift') || cv2Text.includes('working as') || cv2Text.includes('work shift') || cv2Text.includes('what color was')) return 'work';
155
158
  if (cv2Text.includes('weekly')) return 'weekly';
156
159
  if (cv2Text.includes('daily')) return 'daily';
157
160
  if (cv2Text.includes('inventory')) return 'inventory';
@@ -174,11 +177,12 @@ function detectCommand(d) {
174
177
  if (embedText.includes('you searched') || embedText.includes('searched the')) return 'search';
175
178
  if (embedText.includes('you committed') || embedText.includes('went outside')) return 'crime';
176
179
  // Hunt / dig
177
- if (embedText.includes('hunting') || embedText.includes('came back with') || embedText.includes('hunting rifle') || embedText.includes('dragon\'s fireball') || embedText.includes('dodge the')) return 'hunt';
178
- if (embedText.includes('you dig') || embedText.includes('found a') && embedText.includes('digging') || embedText.includes('shovel')) return 'dig';
179
- // Work
180
- if (embedText.includes('work') && (embedText.includes('shift') || embedText.includes('mini-game') || embedText.includes('color') || embedText.includes('what color'))) return 'work';
180
+ if (embedText.includes('hunting') || embedText.includes('came back with') || embedText.includes('hunting rifle') || embedText.includes('dragon\'s fireball') || embedText.includes('dodge the') || embedText.includes('went hunting') || embedText.includes('hunt') && (embedText.includes('caught') || embedText.includes('brought back') || embedText.includes('attacked') || embedText.includes('nothing') || embedText.includes('laughed') || embedText.includes('escaped') || embedText.includes('fell asleep'))) return 'hunt';
181
+ if (embedText.includes('digging') || embedText.includes('you dig') || embedText.includes('found a') && embedText.includes('dig') || embedText.includes('shovel') || embedText.includes('found nothing while') || embedText.includes('you found') && !embedText.includes('search')) return 'dig';
182
+ // Work — match both minigame prompt AND completion
183
+ if (embedText.includes('work') && (embedText.includes('shift') || embedText.includes('mini-game') || embedText.includes('color') || embedText.includes('what color') || embedText.includes('babysitter') || embedText.includes('great work') || embedText.includes('for your shift'))) return 'work';
181
184
  if (embedText.includes('you were given') && embedText.includes('shift')) return 'work';
185
+ if (embedText.includes('working as') || embedText.includes('for your shift')) return 'work';
182
186
  // Postmemes
183
187
  if (embedText.includes('pick a meme') || embedText.includes('meme posting')) return 'postmemes';
184
188
  // Stream
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dankgrinder",
3
- "version": "6.16.0",
3
+ "version": "6.17.0",
4
4
  "description": "Dank Memer automation engine — grind coins while you sleep",
5
5
  "bin": {
6
6
  "dankgrinder": "bin/dankgrinder.js"