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

Method handleBlockedClean

clean/clean.ts:149–169  ·  view source on GitHub ↗
(client: any, msg: Api.Message, parts: string[])

Source from the content-addressed store, hash-verified

147 const mode = parts[3]?.toLowerCase();
148
149 if (!action) {
150 await this.sendError(msg, "请指定清理类型: pm (私聊拉黑) 或 member (群组封禁)");
151 return;
152 }
153
154 switch (action) {
155 case "pm":
156 await this.cleanBlockedPM(client, msg, mode === "all");
157 break;
158 case "member":
159 await this.unblockMember(client, msg, mode === "all");
160 break;
161 default:
162 await this.sendError(msg, `未知类型: ${htmlEscape(action)}`);
163 break;
164 }
165 }
166
167// 私聊已注销账号清理 - 修复版:直接移除整个对话
168 private async cleanDeletedPM(client: any, msg: Api.Message, deleteDialogs: boolean = false): Promise<void> {
169 await this.editMessage(msg, deleteDialogs
170 ? "🔍 正在扫描并从对话列表中移除已注销账号..."
171 : "🔍 正在扫描私聊已注销账号...");
172

Callers 1

handleCleanMethod · 0.95

Calls 4

sendErrorMethod · 0.95
cleanBlockedPMMethod · 0.95
unblockMemberMethod · 0.95
htmlEscapeFunction · 0.70

Tested by

no test coverage detected