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

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