dankgrinder 8.114.0 β†’ 8.343.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.
@@ -14,7 +14,7 @@ const RE_NEWLINE = /\n/g;
14
14
  * @param {function} opts.waitForDankMemer
15
15
  * @returns {Promise<{result: string, coins: number}>}
16
16
  */
17
- async function runBeg({ channel, waitForDankMemer }) {
17
+ async function runBeg({ channel, waitForDankMemer, useSlash = false, prefix = 'pls' }) {
18
18
  LOG.cmd(`${c.white}${c.bold}pls beg${c.reset}`);
19
19
 
20
20
  await sendCommand(channel, 'beg', { useSlash, prefix });
@@ -84,7 +84,7 @@ function pickSafeButton(buttons, customSafe) {
84
84
  * @param {string[]} [opts.safeAnswers]
85
85
  * @returns {Promise<{result: string, coins: number}>}
86
86
  */
87
- async function runCrime({ channel, waitForDankMemer, safeAnswers }) {
87
+ async function runCrime({ channel, waitForDankMemer, safeAnswers, useSlash = false, prefix = 'pls' }) {
88
88
  LOG.cmd(`${c.white}${c.bold}pls crime${c.reset}`);
89
89
 
90
90
  await sendCommand(channel, 'crime', { useSlash, prefix });
@@ -14,7 +14,7 @@ sendCommand,
14
14
  * @param {function} opts.waitForDankMemer
15
15
  * @returns {Promise<{result: string, coins: number}>}
16
16
  */
17
- async function runDeposit({ channel, waitForDankMemer }) {
17
+ async function runDeposit({ channel, waitForDankMemer, useSlash = false, prefix = 'pls' }) {
18
18
  LOG.cmd(`${c.white}${c.bold}pls dep max${c.reset}`);
19
19
 
20
20
  await sendCommand(channel, 'dep max', { useSlash, prefix });
@@ -94,7 +94,7 @@ async function resolveDigFlow({ channel, waitForDankMemer, response }) {
94
94
  * @param {object} [opts.client]
95
95
  * @returns {Promise<{result: string, coins: number}>}
96
96
  */
97
- async function runDig({ channel, waitForDankMemer, client }) {
97
+ async function runDig({ channel, waitForDankMemer, client, useSlash = false, prefix = 'pls' }) {
98
98
  LOG.cmd(`${c.white}${c.bold}pls dig${c.reset}`);
99
99
 
100
100
  await sendCommand(channel, 'dig', { useSlash, prefix });
@@ -14,7 +14,7 @@ const RE_DROP_NAME_FALLBACK = /(\w[\w\s']+)/;
14
14
  const RE_COST_LINE = /Cost:\s*[β£πŸ’°o]?\s*([\d,]+)/i;
15
15
  const RE_WHITESPACE_UNDERSCORE = /\s+/g;
16
16
 
17
- async function runDrops({ channel, waitForDankMemer, redis, accountId }) {
17
+ async function runDrops({ channel, waitForDankMemer, redis, accountId, useSlash = false, prefix = 'pls' }) {
18
18
  LOG.cmd(`${c.white}${c.bold}pls drops${c.reset}`);
19
19
 
20
20
  await sendCommand(channel, 'drops', { useSlash, prefix });
@@ -1293,7 +1293,7 @@ async function advancePastConfirmation(response, waitForDankMemer) {
1293
1293
  // ── Single-cycle farm orchestrator ──────────────────────────────────────────
1294
1294
  // Sends `pls farm view` once, then completes the full hoeβ†’waterβ†’plantβ†’harvest
1295
1295
  // cycle by looping on the returned manage menu β€” no additional command sends.
1296
- async function runFarm({ channel, waitForDankMemer, client, redis, accountId, forceRun }) {
1296
+ async function runFarm({ channel, waitForDankMemer, client, redis, accountId, forceRun, useSlash = false, prefix = 'pls' }) {
1297
1297
  LOG.cmd(`${c.white}${c.bold}pls farm view${c.reset}`);
1298
1298
 
1299
1299
  await sendCommand(channel, 'farm view', { useSlash, prefix });
@@ -303,7 +303,7 @@ async function playFishRound({ gameMsg, channel, msgId, waitForDankMemer }) {
303
303
  * @param {function} opts.waitForDankMemer
304
304
  * @returns {Promise<{result: string, coins: number, nextCooldownSec?: number}>}
305
305
  */
306
- async function runFish({ channel, waitForDankMemer }) {
306
+ async function runFish({ channel, waitForDankMemer, useSlash = false, prefix = 'pls' }) {
307
307
  LOG.cmd(`${c.white}${c.bold}pls fish catch${c.reset}`);
308
308
 
309
309
  await sendCommand(channel, 'fish catch', { useSlash, prefix });
@@ -388,7 +388,7 @@ async function runFish({ channel, waitForDankMemer }) {
388
388
  * @param {AbortSignal} [opts.signal] - Signal to stop early
389
389
  * @returns {Promise<{totalRounds, totalCaught, totalMines, results: Array}>}
390
390
  */
391
- async function runFishLoop({ channel, waitForDankMemer, maxRounds = 50, onRound, signal }) {
391
+ async function runFishLoop({ channel, waitForDankMemer, maxRounds = 50, onRound, signal, useSlash = false, prefix = 'pls' }) {
392
392
  LOG.cmd(`${c.white}${c.bold}pls fish catch${c.reset} (loop mode, max ${maxRounds} rounds)`);
393
393
 
394
394
  await sendCommand(channel, 'fish catch', { useSlash, prefix });
@@ -127,7 +127,7 @@ async function playHighLow(response, depth = 0) {
127
127
  return { result: 'done', coins: 0 };
128
128
  }
129
129
 
130
- async function runHighLow({ channel, waitForDankMemer }) {
130
+ async function runHighLow({ channel, waitForDankMemer, useSlash = false, prefix = 'pls' }) {
131
131
  LOG.cmd(`${c.white}${c.bold}pls hl${c.reset}`);
132
132
 
133
133
  await sendCommand(channel, 'hl', { useSlash, prefix });
@@ -78,7 +78,7 @@ function pickDodgeLane(dragonPos, buttons) {
78
78
  return buttons[Math.floor(Math.random() * buttons.length)];
79
79
  }
80
80
 
81
- async function runHunt({ channel, waitForDankMemer, client }) {
81
+ async function runHunt({ channel, waitForDankMemer, client, useSlash = false, prefix = 'pls' }) {
82
82
  LOG.cmd(`${c.white}${c.bold}pls hunt${c.reset}`);
83
83
 
84
84
  await sendCommand(channel, 'hunt', { useSlash, prefix });
@@ -195,7 +195,7 @@ async function enrichItems(items) {
195
195
  /**
196
196
  * Check inventory for all pages and return full item list.
197
197
  */
198
- async function runInventory({ channel, waitForDankMemer, client, accountId, redis, onPageProgress }) {
198
+ async function runInventory({ channel, waitForDankMemer, client, accountId, redis, onPageProgress, useSlash = false, prefix = 'pls' }) {
199
199
  LOG.cmd(`${c.white}${c.bold}pls inv${c.reset}`);
200
200
 
201
201
  await sendCommand(channel, 'inv', { useSlash, prefix });
@@ -35,7 +35,7 @@ async function refetchMsg(channel, msgId) {
35
35
  * @param {function} opts.waitForDankMemer
36
36
  * @returns {Promise<{result: string, coins: number}>}
37
37
  */
38
- async function runPostMemes({ channel, waitForDankMemer }) {
38
+ async function runPostMemes({ channel, waitForDankMemer, useSlash = false, prefix = 'pls' }) {
39
39
  LOG.cmd(`${c.white}${c.bold}pls pm${c.reset}`);
40
40
 
41
41
  await sendCommand(channel, 'pm', { useSlash, prefix });
@@ -201,7 +201,7 @@ async function getPlayerLevel({ channel, waitForDankMemer, accountId = 'default'
201
201
  * @param {object} [opts.redis]
202
202
  * @returns {Promise<object>} Parsed profile data
203
203
  */
204
- async function runProfile({ channel, waitForDankMemer, accountId = 'default', redis }) {
204
+ async function runProfile({ channel, waitForDankMemer, accountId = 'default', redis, useSlash = false, prefix = 'pls' }) {
205
205
  LOG.cmd(`${c.white}${c.bold}pls profile${c.reset}`);
206
206
  await sendCommand(channel, 'profile', { useSlash, prefix });
207
207
  const response = await waitForDankMemer(8000);
@@ -19,7 +19,7 @@ const { meetsLevelRequirement } = require('./profile');
19
19
  * @param {object} [opts.redis]
20
20
  * @returns {Promise<{result: string, coins: number}>}
21
21
  */
22
- async function runScratch({ channel, waitForDankMemer, accountId, redis }) {
22
+ async function runScratch({ channel, waitForDankMemer, accountId, redis, useSlash = false, prefix = 'pls' }) {
23
23
  // Check level 25 requirement before wasting a command
24
24
  const canRun = await meetsLevelRequirement({ channel, waitForDankMemer, accountId, redis }, 25);
25
25
  if (!canRun) {
@@ -82,7 +82,7 @@ function pickSafeButton(buttons, customSafe) {
82
82
  * @param {string[]} [opts.safeAnswers] - Custom safe search locations
83
83
  * @returns {Promise<{result: string, coins: number}>}
84
84
  */
85
- async function runSearch({ channel, waitForDankMemer, safeAnswers }) {
85
+ async function runSearch({ channel, waitForDankMemer, safeAnswers, useSlash = false, prefix = 'pls' }) {
86
86
  LOG.cmd(`${c.white}${c.bold}pls search${c.reset}`);
87
87
 
88
88
  await sendCommand(channel, 'search', { useSlash, prefix });
@@ -194,7 +194,7 @@ async function selectRandomStreamOption(msg) {
194
194
  }
195
195
  }
196
196
 
197
- async function runStream({ channel, waitForDankMemer, client }) {
197
+ async function runStream({ channel, waitForDankMemer, client, useSlash = false, prefix = 'pls' }) {
198
198
  LOG.cmd(`${c.white}${c.bold}pls stream${c.reset}`);
199
199
 
200
200
  await sendCommand(channel, 'stream', { useSlash, prefix });
@@ -77,7 +77,7 @@ async function learnFromResult(question, correctAnswer, redis) {
77
77
  LOG.debug(`[trivia] Learned: "${key.substring(0, 40)}..." β†’ "${correctAnswer}"`);
78
78
  }
79
79
 
80
- async function runTrivia({ channel, waitForDankMemer, redis }) {
80
+ async function runTrivia({ channel, waitForDankMemer, redis, useSlash = false, prefix = 'pls' }) {
81
81
  LOG.cmd(`${c.white}${c.bold}pls trivia${c.reset}`);
82
82
 
83
83
  await sendCommand(channel, 'trivia', { useSlash, prefix });
@@ -404,7 +404,7 @@ async function handleGenericMinigame({ channel, current, waitForDankMemer }) {
404
404
  * @param {function} opts.waitForDankMemer
405
405
  * @returns {Promise<{result: string, coins: number, nextCooldownSec?: number}>}
406
406
  */
407
- async function runWorkShift({ channel, waitForDankMemer }) {
407
+ async function runWorkShift({ channel, waitForDankMemer, useSlash = false, prefix = 'pls' }) {
408
408
  LOG.cmd(`${c.white}${c.bold}pls work shift${c.reset}`);
409
409
 
410
410
  await sendCommand(channel, 'work shift', { useSlash, prefix });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dankgrinder",
3
- "version": "8.114.0",
3
+ "version": "8.343.0",
4
4
  "description": "Dank Memer automation engine β€” grind coins while you sleep",
5
5
  "bin": {
6
6
  "dankgrinder": "bin/dankgrinder.js"