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

Method handleStatus

autodelcmd/autodelcmd.ts:1043–1062  ·  view source on GitHub ↗
(msg: Api.Message)

Source from the content-addressed store, hash-verified

1041 const allRules = serviceInstance!.getAllRules();
1042
1043 const statusIcon = isEnabled ? "🟢" : "🔴";
1044 const statusText = isEnabled ? "已启用" : "已禁用";
1045
1046 let text = `📊 <b>自动删除功能状态</b>\n\n`;
1047 text += `${statusIcon} 功能状态: <b>${statusText}</b>\n\n`;
1048 text += `📋 规则统计:\n`;
1049 text += `• 配置规则数: ${allRules.length}\n\n`;
1050
1051 if (!isEnabled) {
1052 text += ``;
1053 } else {
1054 text += ``;
1055 }
1056
1057 await msg.edit({ text, parseMode: "html" });
1058 }
1059
1060 private async handleEnable(msg: Api.Message) {
1061 await serviceInstance!.setEnabled(true);
1062 await msg.edit({
1063 text: "🟢 <b>自动删除功能已启用</b>\n\n符合规则的命令消息将自动延迟删除",
1064 parseMode: "html"
1065 });

Callers 1

AutoDeletePluginClass · 0.95

Calls 3

getAllRulesMethod · 0.80
isEnabledMethod · 0.45
editMethod · 0.45

Tested by

no test coverage detected