(text: string | undefined)
| 287 | } |
| 288 | |
| 289 | function parseImageCount(text: string | undefined): number { |
| 290 | if (!text) return CONFIG.DEFAULT_COUNT; |
| 291 | |
| 292 | const args = text.split(" ").slice(1); |
| 293 | if (!args[0]) return CONFIG.DEFAULT_COUNT; |
| 294 | |
| 295 | const n = parseInt(args[0], 10); |
| 296 | return !isNaN(n) && n > 0 ? Math.min(n, CONFIG.MAX_IMAGES) : CONFIG.DEFAULT_COUNT; |
| 297 | } |
| 298 | |
| 299 | async function sendSingleImage( |
| 300 | client: any, |