(text: string)
| 1680 | 删除失败记录(支持 all)</blockquote>` |
| 1681 | }; |
| 1682 | |
| 1683 | if (section && sections[section]) return sections[section]; |
| 1684 | return sections.overview; |
| 1685 | } |
| 1686 | |
| 1687 | // ─── 指令处理器(统一入口)──────────────────────────────────────────────────── |
| 1688 | |
| 1689 | const pmcaptcha = async (message: Api.Message) => { |
| 1690 | if (!getActiveLifecycle()) return; |
| 1691 | if (!(await waitDb())) return; |
| 1692 | const client = message.client as TelegramClient; |
| 1693 | const args = message.message.slice(1).split(/\s+/).slice(1); |
| 1694 | const command = (args[0] || "help").toLowerCase(); |
| 1695 | |
| 1696 | // ── on / off:启用 / 禁用插件 ──────────────────────────────────────────────── |
| 1697 | // 注意:off 只停用插件本身,不重置 captcha 状态,下次 on 后自动恢复 |
| 1698 | if (command === "on" || command === "off") { |
| 1699 | const enabling = command === "on"; |
| 1700 | set(K.ENABLED, enabling); |
no test coverage detected