dankgrinder 6.17.0 → 6.21.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/rawLogger.js CHANGED
@@ -152,18 +152,30 @@ 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
+ if (cv2Text.includes('hunting') || cv2Text.includes('went hunting') || cv2Text.includes('hunting rifle') || cv2Text.includes('your aim was so bad') || cv2Text.includes('animals laughed') || cv2Text.includes('animals attacked') || cv2Text.includes('barely escaped') || cv2Text.includes('fell asleep in a tree') || cv2Text.includes('caught nothing') || cv2Text.includes('brought back literally nothing') || cv2Text.includes('rifle broke')) return 'hunt';
156
+ if (cv2Text.includes('digging') || cv2Text.includes('found nothing while') || cv2Text.includes('you dig') || cv2Text.includes('dug in the dirt') || cv2Text.includes('brought back') && (cv2Text.includes('ant') || cv2Text.includes('worm') || cv2Text.includes('stickbug') || cv2Text.includes('ladybug'))) 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') || cv2Text.includes('remember words order') || cv2Text.includes('remember the colors') || cv2Text.includes('remember the emojis') || cv2Text.includes('what word was repeated') || cv2Text.includes('unscramble') || cv2Text.includes('remember the number') || cv2Text.includes('click the buttons in correct order') || cv2Text.includes('babysitter') || cv2Text.includes('click the matching')) return 'work';
158
158
  if (cv2Text.includes('weekly')) return 'weekly';
159
159
  if (cv2Text.includes('daily')) return 'daily';
160
160
  if (cv2Text.includes('inventory')) return 'inventory';
161
161
  if (cv2Text.includes('profile') || cv2Text.includes('level:')) return 'profile';
162
+ if (cv2Text.includes('balances') && cv2Text.includes('global rank')) return 'balance';
163
+
164
+ // Check content text (plain message content)
165
+ const contentText = (d.content || '').toLowerCase();
166
+ if (contentText.includes('balances') && contentText.includes('global rank')) return 'balance';
167
+ if (contentText.includes('your aim was so bad') || contentText.includes('animals laughed')) return 'hunt';
168
+ if (contentText.includes('imagine going into the woods')) return 'hunt';
169
+ if (contentText.includes('you ran an ad for') && contentText.includes('received')) return 'stream';
170
+ if (contentText.includes('you can\'t interact with your stream')) return 'stream';
171
+ if (contentText.includes('you dug in the dirt') || contentText.includes('found nothing while digging')) return 'dig';
162
172
 
163
173
  // Check embed text
164
174
  const embedText = extractEmbedText(d.embeds).toLowerCase();
165
175
  // Gambling
166
176
  if (embedText.includes('high') && embedText.includes('low') && embedText.includes('secret number')) return 'highlow';
177
+ if (embedText.includes('you won') && embedText.includes('your hint was') && embedText.includes('the hidden number was')) return 'highlow';
178
+ if (embedText.includes('you lost') && embedText.includes('your hint was') && embedText.includes('the hidden number was')) return 'highlow';
167
179
  if (embedText.includes('blackjack') || embedText.includes('dealer')) return 'blackjack';
168
180
  if (embedText.includes('roulette')) return 'roulette';
169
181
  if (embedText.includes('spinning') && embedText.includes('slots')) return 'slots';
@@ -175,22 +187,40 @@ function detectCommand(d) {
175
187
  if (embedText.includes('what crime do you want')) return 'crime';
176
188
  if (embedText.includes('where do you want to search')) return 'search';
177
189
  if (embedText.includes('you searched') || embedText.includes('searched the')) return 'search';
190
+ if (embedText.includes('committed') && (embedText.includes('trespassing') || embedText.includes('identity theft') || embedText.includes('fraud') || embedText.includes('shoplifting') || embedText.includes('dui') || embedText.includes('tax evasion') || embedText.includes('littering') || embedText.includes('cyber bullying') || embedText.includes('grand theft auto') || embedText.includes('drug distribution') || embedText.includes('bank robbing') || embedText.includes('arson') || embedText.includes('murder') || embedText.includes('vandalism') || embedText.includes('jaywalking') || embedText.includes('piracy') || embedText.includes('breaking and entering'))) return 'crime';
178
191
  if (embedText.includes('you committed') || embedText.includes('went outside')) return 'crime';
192
+ if (embedText.includes('stole a developer') || embedText.includes('got confused about what trespassing')) return 'crime';
193
+ // Search results (person names) - also check for beg results
194
+ if ((embedText.includes('oh you poor soul') || embedText.includes('take this') || embedText.includes('sure take') || embedText.includes('here\'s a thought') || embedText.includes('nope, nothing') || embedText.includes('no u') || embedText.includes('coins? in this economy')) && (embedText.includes('###') || embedText.includes('charlie chaplin') || embedText.includes('shrek') || embedText.includes('elton john') || embedText.includes('alexa') || embedText.includes('confucius') || embedText.includes('doctor strange') || embedText.includes('rick astley') || embedText.includes('toby turner') || embedText.includes('oprah') || embedText.includes('bruce lee') || embedText.includes('david attenborough') || embedText.includes('honey badger'))) {
195
+ // Check if it's a beg result (has life saver or specific beg text)
196
+ if (embedText.includes('life saver') || embedText.includes('lifesaver')) return 'beg';
197
+ return 'search';
198
+ }
179
199
  // Hunt / dig
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';
200
+ 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('your aim was so bad') || embedText.includes('animals laughed') || embedText.includes('animals attacked') || embedText.includes('barely escaped') || embedText.includes('fell asleep in a tree') || embedText.includes('caught nothing') || embedText.includes('brought back literally nothing') || embedText.includes('rifle broke') || embedText.includes('imagine going into the woods')) return 'hunt';
201
+ if (embedText.includes('digging') || embedText.includes('you dig') || embedText.includes('dug in the dirt') || embedText.includes('found nothing while') || embedText.includes('what are the odds lol') || embedText.includes('brought back') && (embedText.includes('ant') || embedText.includes('worm') || embedText.includes('stickbug') || embedText.includes('ladybug'))) return 'dig';
182
202
  // Work — match both minigame prompt AND completion
183
203
  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';
184
204
  if (embedText.includes('you were given') && embedText.includes('shift')) return 'work';
185
205
  if (embedText.includes('working as') || embedText.includes('for your shift')) return 'work';
206
+ if (embedText.includes('remember words order') || embedText.includes('remember the colors') || embedText.includes('remember the emojis') || embedText.includes('what word was repeated') || embedText.includes('unscramble the word') || embedText.includes('remember the number') || embedText.includes('click the buttons in correct order') || embedText.includes('click the matching')) return 'work';
186
207
  // Postmemes
187
208
  if (embedText.includes('pick a meme') || embedText.includes('meme posting')) return 'postmemes';
188
209
  // Stream
189
- if (embedText.includes('stream manager') || embedText.includes('go live') || embedText.includes('what game do you want to stream')) return 'stream';
210
+ if (embedText.includes('stream manager') || embedText.includes('go live') || embedText.includes('what game do you want to stream') || embedText.includes('you ran an ad for') || embedText.includes('you received') && embedText.includes('from your sponsors') || embedText.includes('### chat') && embedText.includes('hasanbabi')) return 'stream';
211
+ if (embedText.includes('you can\'t interact with your stream') || embedText.includes('stream can last')) return 'stream';
190
212
  // Deposit
191
213
  if (embedText.includes('deposited') && embedText.includes('bank balance')) return 'deposit';
214
+ // Balance
215
+ if (embedText.includes('balances') && embedText.includes('global rank') && embedText.includes('net worth')) return 'balance';
192
216
  // Trivia
193
- if (embedText.includes('you have 10 seconds to answer') || embedText.includes('trivia')) return 'trivia';
217
+ if (embedText.includes('you have 10 seconds to answer') || embedText.includes('you have 12 seconds to answer') || embedText.includes('you have 15 seconds to answer') || embedText.includes('trivia') || embedText.includes('difficulty') && embedText.includes('category') && (embedText.includes('correct answer was') || embedText.includes('you got that answer correct'))) return 'trivia';
218
+ if (embedText.includes('who in pulp fiction') || embedText.includes('what was') || embedText.includes('which of')) return 'trivia';
219
+ // Cooldown messages
220
+ if (embedText.includes('you can work again at') || embedText.includes('you can use this command again')) return 'cooldown';
221
+ if (embedText.includes('amount needs to be greater than 0')) return 'cooldown';
222
+ // Premium/upgrade messages
223
+ if (embedText.includes('you can buy the ability to use this command')) return 'premium';
194
224
  // Profile / level
195
225
  if (embedText.includes('level:') && embedText.includes('experience:')) return 'profile';
196
226
  // Shop
@@ -217,7 +247,15 @@ function parseRawPacket(d, event) {
217
247
  const embedText = extractEmbedText(d.embeds);
218
248
  const isCV2 = !!(d.flags & 32768);
219
249
  const isEphemeral = !!(d.flags & 64);
220
- const command = detectCommand(d);
250
+
251
+ // For UPDATE events, try to preserve the original command classification
252
+ let command = detectCommand(d);
253
+ if (event === 'UPDATE' && command === 'unknown') {
254
+ const existing = memStore.get(d.id);
255
+ if (existing && existing.command && existing.command !== 'unknown') {
256
+ command = existing.command;
257
+ }
258
+ }
221
259
 
222
260
  return {
223
261
  id: d.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dankgrinder",
3
- "version": "6.17.0",
3
+ "version": "6.21.0",
4
4
  "description": "Dank Memer automation engine — grind coins while you sleep",
5
5
  "bin": {
6
6
  "dankgrinder": "bin/dankgrinder.js"