(msg: Api.Message)
| 150 | } |
| 151 | |
| 152 | private async showAutoDelSettings(msg: Api.Message): Promise<void> { |
| 153 | const chatId = msg.peerId.toString(); |
| 154 | const globalSeconds = this.settings.get("0"); |
| 155 | const chatSeconds = this.settings.get(chatId); |
| 156 | |
| 157 | let text = "📋 <b>自动删除设置:</b>\n\n"; |
| 158 | |
| 159 | if (chatSeconds) { |
| 160 | text += `当前聊天:${chatSeconds} 秒\n`; |
| 161 | } else if (globalSeconds) { |
| 162 | text += `当前聊天:全局 ${globalSeconds} 秒\n`; |
| 163 | } else { |
| 164 | text += "当前聊天:未设置\n"; |
| 165 | } |
| 166 | |
| 167 | if (globalSeconds) { |
| 168 | text += `全局设置:${globalSeconds} 秒`; |
| 169 | } else { |
| 170 | text += "全局设置:未设置"; |
| 171 | } |
| 172 | |
| 173 | await msg.edit({ |
| 174 | text, |
| 175 | parseMode: "html" |
| 176 | }); |
| 177 | } |
| 178 | |
| 179 | private async cancelAutoDelSetting(msg: Api.Message, isGlobal: boolean): Promise<void> { |
| 180 | const chatId = isGlobal ? "0" : msg.peerId.toString(); |
no test coverage detected