MCPcopy Index your code
hub / github.com/TeleBoxOrg/TeleBox_Plugins / handleClean

Method handleClean

clean/clean.ts:87–123  ·  view source on GitHub ↗
(msg: Api.Message)

Source from the content-addressed store, hash-verified

85
86 // 主命令处理器
87 private async handleClean(msg: Api.Message): Promise<void> {
88 const client = await getGlobalClient();
89 if (!client) {
90 await this.editMessage(msg, "❌ 客户端未就绪");
91 return;
92 }
93
94 try {
95 const text = msg.text || "";
96 const parts = text.trim().split(/\s+/);
97 const subCommand = parts[1]?.toLowerCase();
98
99 // 显示帮助
100 if (!subCommand || subCommand === "help" || subCommand === "h") {
101 await this.editMessage(msg, HELP_TEXT);
102 return;
103 }
104
105 await this.editMessage(msg, "🔄 正在处理请求...");
106
107 // 路由到对应功能模块
108 switch (subCommand) {
109 case "deleted":
110 await this.handleDeletedClean(client, msg, parts);
111 break;
112 case "blocked":
113 await this.handleBlockedClean(client, msg, parts);
114 break;
115 default:
116 await this.sendError(msg, `未知子命令: ${htmlEscape(subCommand)}`);
117 break;
118 }
119
120 } catch (error: any) {
121 await this.handleError(msg, error);
122 }
123 }
124
125 // 处理删除账号清理
126 private async handleDeletedClean(client: any, msg: Api.Message, parts: string[]): Promise<void> {

Callers

nothing calls this directly

Calls 6

editMessageMethod · 0.95
handleDeletedCleanMethod · 0.95
handleBlockedCleanMethod · 0.95
sendErrorMethod · 0.95
handleErrorMethod · 0.95
htmlEscapeFunction · 0.70

Tested by

no test coverage detected