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

Method untraceKeyword

trace/trace.ts:365–380  ·  view source on GitHub ↗
(msg: Api.Message, keyword: string)

Source from the content-addressed store, hash-verified

363 const previousReactions = `${standardCount}个标准 + ${customCount}个会员表情`;
364 delete this.db.data.users[userId];
365 await this.db.write();
366 const userEntity = await this.formatEntity(userId);
367 const untrackMsg = `🗑️ <b>取消追踪</b>\n` +
368 `├ 👤 用户: ${userEntity.display}\n` +
369 `├ 🎯 原表情: ${previousReactions}\n` +
370 `└ 📊 剩余追踪: ${Object.keys(this.db.data.users).length} 个用户`;
371 await this.editAndDelete(msg, untrackMsg, 10);
372 } else {
373 await this.editAndDelete(msg, "ℹ️ <b>提示</b>\n└ 该用户未被追踪");
374 }
375 }
376
377 private async traceKeyword(msg: Api.Message, keyword: string, emojiText: string) {
378 const reactions = await this.parseReactions(msg, emojiText);
379 if (reactions.length === 0) {
380 await this.editAndDelete(msg, "❌ <b>操作失败</b>\n├ 未找到有效的表情符号\n└ 请检查帮助中的可用列表");
381 return;
382 }
383 const isUpdate = keyword in this.db.data.keywords;

Callers 1

handleTraceMethod · 0.95

Calls 3

editAndDeleteMethod · 0.95
writeMethod · 0.80
htmlEscapeFunction · 0.70

Tested by

no test coverage detected