(msg: Api.Message, key: "keepLog" | "big", value: string)
| 475 | response += `\n⚙️ <b>当前配置</b>\n`; |
| 476 | response += `├ 📝 保留日志: ${this.db.data.config.keepLog ? '✅ 启用' : '❌ 禁用'}\n`; |
| 477 | response += `└ 🎭 大号动画: ${this.db.data.config.big ? '✅ 启用' : '❌ 禁用'}\n`; |
| 478 | |
| 479 | response += `\n━━━━━━━━━━━━━━━━\n`; |
| 480 | |
| 481 | await msg.edit({ text: response, parseMode: "html" }); |
| 482 | } |
| 483 | |
| 484 | private async cleanTraces(msg: Api.Message) { |
| 485 | const prevUserCount = Object.keys(this.db.data.users).length; |
| 486 | const prevKeywordCount = Object.keys(this.db.data.keywords).length; |
| 487 | this.db.data.users = {}; |
| 488 | this.db.data.keywords = {}; |
| 489 | await this.db.write(); |
| 490 | const cleanMsg = `🗑️ <b>清理完成</b>\n` + |
| 491 | `├ 👥 清除用户: ${prevUserCount} 个\n` + |
| 492 | `├ 🔑 清除关键字: ${prevKeywordCount} 个\n` + |
| 493 | `└ ✅ 所有追踪已清空`; |
| 494 | await this.editAndDelete(msg, cleanMsg, 10); |
| 495 | } |
| 496 | |
| 497 | private async resetDatabase(msg: Api.Message) { |
no test coverage detected