(msg: Api.Message, text: string)
| 440 | parseMode: "html" |
| 441 | }); |
| 442 | return; |
| 443 | } |
| 444 | |
| 445 | // 调用内置核心 |
| 446 | const formatted = PanguSpacer.spacing(text); |
| 447 | |
| 448 | await msg.edit({ |
| 449 | text: `🔤 <b>Pangu 格式化测试</b>\n\n` + |
| 450 | `<b>原始文本:</b>\n<code>${htmlEscape(text)}</code>\n\n` + |
| 451 | `<b>格式化后:</b>\n<code>${htmlEscape(formatted)}</code>\n\n` + |
| 452 | `<b>状态:</b> ${text === formatted ? "无需调整" : "已优化"}`, |
| 453 | parseMode: "html" |
| 454 | }); |
| 455 | } |
| 456 | |
| 457 | // 显示状态 |
| 458 | private async showStatus(msg: Api.Message): Promise<void> { |
| 459 | const chatId = this.getChatId(msg); |
| 460 | const chatMode = this.getChatMode(chatId); |
| 461 | const globalMode = this.db.data.globalMode; |
| 462 | const white = this.isWhite(chatId); |
| 463 | const black = this.isBlack(chatId); |
| 464 | const stats = this.db.data.stats; |
no test coverage detected