| 854 | |
| 855 | try { |
| 856 | await job.client.sendMessage(job.peerId, { |
| 857 | ...baseOptions, |
| 858 | ...(job.replyToMsgId ? { replyTo: job.replyToMsgId } : {}), |
| 859 | }); |
| 860 | } catch (e) { |
| 861 | if (!job.replyToMsgId) throw e; |
| 862 | await job.client.sendMessage(job.peerId, baseOptions); |
| 863 | } |
| 864 | } |
| 865 | |
| 866 | private async sendReplyQuiet(job: TempAdminJob, message: string): Promise<void> { |
| 867 | try { |
| 868 | await this.sendReply(job, message); |
| 869 | } catch (error) { |
| 870 | console.error("[tmp_admin] 发送到期通知失败:", error); |
| 871 | } |
| 872 | } |
| 873 | |
| 874 | private async listJobs( |