(msg: Api.Message)
| 366 | const scaleEq = lower.match(/^(?:scale|s)[=:](\d+(?:\.\d+)?)$/); |
| 367 | if (scaleEq) { |
| 368 | const s = Number(scaleEq[1]); |
| 369 | if (Number.isFinite(s) && s > 0) out.scale = Math.min(20, Math.max(1, s)); |
| 370 | continue; |
| 371 | } |
| 372 | if (lower === "scale" || lower === "s") { |
| 373 | const next = args[i + 1]; |
| 374 | const s = next ? Number(next) : NaN; |
| 375 | if (Number.isFinite(s) && s > 0) { |
| 376 | out.scale = Math.min(20, Math.max(1, s)); |
| 377 | i++; |
| 378 | } |
| 379 | continue; |
| 380 | } |
| 381 | |
| 382 | // bg=#xxx / color=#xxx / background=#xxx |
| 383 | const colorEq = lower.match(/^(?:bg|color|background)[=:](.+)$/i); |
| 384 | if (colorEq) { |
| 385 | out.backgroundColor = normalizeColorToken(colorEq[1]); |
| 386 | out.color = out.backgroundColor; |
no test coverage detected