(msg: Api.Message, args: string[])
| 1341 | } |
| 1342 | |
| 1343 | async function handleSearchAudio(msg: Api.Message, args: string[]): Promise<void> { |
| 1344 | const replyMsg = await msg.getReplyMessage(); |
| 1345 | const { userQuestion, displayQuestion, apiQuestion } = extractQuestionFromArgs(args, replyMsg); |
| 1346 | |
| 1347 | if (!apiQuestion) { |
| 1348 | await msg.edit({ text: "❌ 请提供搜索查询或回复一条有文字内容的消息" }); |
| 1349 | return; |
| 1350 | } |
| 1351 | |
| 1352 | await msg.edit({ text: "🔍 搜索中..." }); |
| 1353 | await handleQuestionWithAudio(msg, apiQuestion, displayQuestion, true, 'Search Audio', replyMsg); |
| 1354 | } |
| 1355 | |
| 1356 | async function handleSettings(msg: Api.Message): Promise<void> { |
| 1357 | const switchToText = (value: string): string => value === "on" ? "开启" : "关闭"; |
no test coverage detected