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

Method handleNewMessage

im/im.ts:458–472  ·  view source on GitHub ↗
(event: NewMessageEvent)

Source from the content-addressed store, hash-verified

456 return;
457 }
458 config.defaultAction = action;
459 await ConfigManager.saveConfig();
460 await MessageManager.edit(msg, `✅ 默认操作已设置为: <code>${action}</code>`);
461 break;
462 }
463 case "list": {
464 let output = `<b>🖼️ 图片监控配置</b>\n\n`;
465 output += `<b>状态:</b> ${config.enabled ? "启用" : "禁用"}\n`;
466 output += `<b>默认操作:</b> <code>${config.defaultAction}</code>\n`;
467 output += `<b>监控群组:</b>\n${config.monitoredChats.map(c => `<code>- ${htmlEscape(c.name)} (${c.id})</code>`).join("\n") || "无"}\n\n`;
468 output += `<b>MD5列表:</b>\n`;
469 const md5s = Object.entries(config.bannedMD5s);
470 if (md5s.length > 0) {
471 output += md5s.map(([md5, action]) => `<code>- ${htmlEscape(md5)} (${action})</code>`).join("\n");
472 } else {
473 output += "无";
474 }
475 output += `\n\n<b>贴纸ID列表:</b>\n`;

Callers 1

ImageMonitorPluginClass · 0.95

Calls 3

processImageMessageMethod · 0.95
getPeerIdFunction · 0.85
getConfigMethod · 0.45

Tested by

no test coverage detected