(msg: Api.Message)
| 524 | const chatId = this.getChatId(msg); |
| 525 | if (chatId) { |
| 526 | const exitMsgs = await this.loadExitMessages(); |
| 527 | const filteredMsgs = exitMsgs.filter( |
| 528 | exitMsg => !(exitMsg.cid === chatId && exitMsg.mid === msg.id) |
| 529 | ); |
| 530 | await this.saveExitMessages(filteredMsgs); |
| 531 | } |
| 532 | } catch (error) { |
| 533 | console.error(`[autodelcmd] 清理删除任务失败:`, error); |
| 534 | } |
| 535 | } |
| 536 | |
| 537 | // 配置管理方法 |
| 538 | public async addCustomRule(rule: CommandRule): Promise<{ success: boolean; error?: string; merged?: boolean }> { |
| 539 | if (!this.config.customRules) { |
| 540 | this.config.customRules = []; |
| 541 | } |
| 542 |
no test coverage detected