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

Method handleReset

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

Source from the content-addressed store, hash-verified

1032 const allRules = serviceInstance!.getAllRules();
1033 await msg.edit({
1034 text: `✅ 已重置为默认配置\n\n已恢复 ${allRules.length} 条预设规则\n\n使用 <code>${mainPrefix}autodelcmd list</code> 查看所有规则`,
1035 parseMode: "html"
1036 });
1037 }
1038
1039 private async handleStatus(msg: Api.Message) {
1040 const isEnabled = serviceInstance!.isEnabled();
1041 const allRules = serviceInstance!.getAllRules();
1042
1043 const statusIcon = isEnabled ? "🟢" : "🔴";
1044 const statusText = isEnabled ? "已启用" : "已禁用";

Callers 1

AutoDeletePluginClass · 0.95

Calls 3

resetToDefaultsMethod · 0.80
getAllRulesMethod · 0.80
editMethod · 0.45

Tested by

no test coverage detected