MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / handleSearchAudio

Function handleSearchAudio

outdated/gemini/gemini.ts:1343–1354  ·  view source on GitHub ↗
(msg: Api.Message, args: string[])

Source from the content-addressed store, hash-verified

1341}
1342
1343async 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
1356async function handleSettings(msg: Api.Message): Promise<void> {
1357 const switchToText = (value: string): string => value === "on" ? "开启" : "关闭";

Callers 1

handleGeminiRequestFunction · 0.85

Calls 3

extractQuestionFromArgsFunction · 0.85
handleQuestionWithAudioFunction · 0.85
editMethod · 0.45

Tested by

no test coverage detected