| 484 | for (const line of lines) { |
| 485 | const separator = current.endsWith("\n\n") ? "" : "\n"; |
| 486 | if ((current + separator + line).length > MAX_CHUNK_LENGTH) { |
| 487 | parts.push(current); |
| 488 | current = continuationHeader + line; |
| 489 | } else { |
| 490 | current += separator + line; |
| 491 | } |
| 492 | } |
| 493 | |
| 494 | if (current) parts.push(current); |
| 495 | return parts; |
| 496 | } |
| 497 | |
| 498 | class BikoPlugin extends Plugin { |
| 499 | |
| 500 | description: string = helpText; |
| 501 | |
| 502 | cmdHandlers: Record< |
| 503 | string, |
| 504 | (msg: Api.Message, trigger?: Api.Message) => Promise<void> |
| 505 | > = { |
| 506 | biko: async (msg: Api.Message) => { |