(msg: Api.Message, keyword: string)
| 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; |
no test coverage detected