dankgrinder 8.71.0 → 8.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 CHANGED
@@ -2503,8 +2503,8 @@ class AccountWorker {
2503
2503
  if (!this.account.discord_token && !this.account.access_token) { this.log('error', 'No token or access token'); return; }
2504
2504
  if (!this.account.channel_id && this.account.grind_mode !== 'dm') { this.log('error', 'No channel'); return; }
2505
2505
 
2506
- // Determine login token: OAuth access_token takes priority over discord_token
2507
- const loginToken = this.account.access_token || this.account.discord_token;
2506
+ // Determine login token: discord_token (user token) takes priority over OAuth access_token
2507
+ const loginToken = this.account.discord_token || this.account.access_token;
2508
2508
  const grindMode = this.account.grind_mode || 'channel';
2509
2509
  const isDMMode = grindMode === 'dm';
2510
2510
 
package/lib/ui.js CHANGED
@@ -127,8 +127,10 @@ function layout() {
127
127
 
128
128
  // ── Column layout ─────────────────────────────────────────────
129
129
  function getCol() {
130
- const col = { st: 9, name: 18, cmd: 16, bal: 8, ls: 3, lv: 3, earned: 8 };
131
- const nameExtra = Math.max(0, _inner - col.st - col.name - col.cmd - col.bal - col.ls - col.lv - col.earned - 14);
130
+ const col = { st: 9, name: 18, cmd: 18, bal: 10, ls: 3, lv: 3, earned: 10 };
131
+ // Account row visual parts: '│ ' + '# ' + status + ' ' + name + ' ' + doing + ' ' + bal + ' ' + ls + ' ' + lv + ' ' + earned + ' │'
132
+ const rowPadding = 1 + 2 + 1 + col.st + 1 + col.name + 1 + col.cmd + 1 + col.bal + 1 + col.ls + 1 + col.lv + 1 + col.earned + 2;
133
+ const nameExtra = Math.max(0, _inner - rowPadding);
132
134
  col.name += nameExtra;
133
135
  return col;
134
136
  }
@@ -187,9 +189,13 @@ function draw() {
187
189
  const line = i === 1 ? BANNER_LINES[1].replace('PLACEHOLDER', _version) : BANNER_LINES[i];
188
190
  if (i < 2) {
189
191
  const gradLine = gradientLine(line, 77, 212, 238, 255, 92, 147);
190
- process.stdout.write(`${B}│\x1b[0m ${gradLine}${' '.repeat(_inner - 2 - stripAnsi(gradLine) - 2)}${B}│`);
192
+ const ansiLen = stripAnsi(gradLine).length;
193
+ const totalContent = 2 + ansiLen; // left spaces + content
194
+ process.stdout.write(`${B}│\x1b[0m ${gradLine}${' '.repeat(Math.max(0, _inner - totalContent - 1))}${B}│`);
191
195
  } else {
192
- process.stdout.write(`${B}│\x1b[0m ${DIM}${line}${c.reset}${' '.repeat(_inner - 2 - stripAnsi(line) - 2)}${B}│`);
196
+ const ansiLen = stripAnsi(line).length;
197
+ const totalContent = 2 + ansiLen;
198
+ process.stdout.write(`${B}│\x1b[0m ${DIM}${line}${c.reset}${' '.repeat(Math.max(0, _inner - totalContent - 1))}${B}│`);
193
199
  }
194
200
  ln();
195
201
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dankgrinder",
3
- "version": "8.71.0",
3
+ "version": "8.73.0",
4
4
  "description": "Dank Memer automation engine — grind coins while you sleep",
5
5
  "bin": {
6
6
  "dankgrinder": "bin/dankgrinder.js"