| 35 | } |
| 36 | |
| 37 | export interface BotCommand { |
| 38 | /** Without the leading slash, e.g. `new`. */ |
| 39 | name: string; |
| 40 | /** One line, shown in the native `/` menu and in `/help`. Keep < ~60 chars (Telegram limit). */ |
| 41 | description: string; |
| 42 | run(ctx: CommandCtx): Promise<void>; |
| 43 | } |
| 44 | |
| 45 | const NA = (feature: string) => `ℹ️ ${feature} isn't available on this bot build.`; |
| 46 | const truncate = (s: string, n: number): string => { s = s.replace(/\s+/g, ' ').trim(); return s.length > n ? s.slice(0, n - 1) + '…' : s; }; |
no outgoing calls
no test coverage detected