MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / handleTest

Method handleTest

pangu/pangu.ts:442–461  ·  view source on GitHub ↗
(msg: Api.Message, text: string)

Source from the content-addressed store, hash-verified

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;

Callers 1

PanguPluginClass · 0.95

Calls 3

spacingMethod · 0.80
htmlEscapeFunction · 0.70
editMethod · 0.45

Tested by

no test coverage detected