(text: string)
| 82 | }; |
| 83 | |
| 84 | function getArgs(text: string): string { |
| 85 | const matched = prefixes.find((prefix) => text.trim().startsWith(prefix)) || mainPrefix; |
| 86 | const body = text.trim().slice(matched.length).trim(); |
| 87 | const firstSpace = body.search(/\s/); |
| 88 | return firstSpace < 0 ? "" : body.slice(firstSpace + 1).trim(); |
| 89 | } |
| 90 | |
| 91 | function parseLimitFromParts(parts: string[]): number { |
| 92 | const value = Number(parts[0]); |