(m: CaptchaMode)
| 810 | if (timeout > 0) lines.push(`⏱ 验证时间:${htmlEscape(timeout)} 秒`); |
| 811 | if (maxTries > 0) lines.push(`🔢 剩余次数:${htmlEscape(maxTries)} 次`); |
| 812 | lines.push(`⚠️ 验证失败将会:${htmlEscape(actionDesc)}`); |
| 813 | return lines.join("\n"); |
| 814 | } |
| 815 | |
| 816 | /** |
| 817 | * 刷新所有正在进行中的验证消息(在超时/次数/失败操作变更后调用)。 |
| 818 | * 图片模式更新 caption,文字模式更新消息正文。 |
| 819 | */ |
| 820 | async function refreshActiveCaptchas(client: TelegramClient): Promise<void> { |
| 821 | for (const [userId, state] of states.entries()) { |
| 822 | const promptMsgId = state.msgIds[0]; |