(msg: Api.Message, apiKey: string)
| 421 | ? `🔑 当前 API Key: <code>...${currentKey.slice(-4)}</code>` |
| 422 | : "❌ 未设置 API Key。"; |
| 423 | await msg.edit({ text, parseMode: "html" }); |
| 424 | return; |
| 425 | } |
| 426 | if (apiKey.toLowerCase() === "clear") { |
| 427 | GeminiConfigManager.set(GEMINI_API_KEY, ""); |
| 428 | await msg.edit({ text: "✅ API Key 已清除。" }); |
| 429 | return; |
| 430 | } |
| 431 | GeminiConfigManager.set(GEMINI_API_KEY, apiKey); |
| 432 | await msg.edit({ text: "✅ API Key 已保存。" }); |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | export default new ConvertPlugin(); |
no test coverage detected