This commit is contained in:
2026-05-01 05:18:39 +03:00
parent 0f91e43ea0
commit c24bc8394b
+2 -2
View File
@@ -2052,9 +2052,9 @@ export async function processNewMessage(msg: Message): Promise<void> {
let voiceB64: string | null = null;
const modelInfo = await commands.find(c => c instanceof OllamaGetModel).getModelCapabilities();
const modelInfo = await commands.find(c => c instanceof OllamaGetModel)?.getModelCapabilities();
if (msg.voice && modelInfo.audio?.supported) {
if (msg.voice && modelInfo?.audio?.supported) {
const filePath = (await bot.getFile({file_id: msg.voice.file_id})).file_path;
let fileBuffer = await downloadTelegramFile(filePath);
const input = path.join(Environment.DATA_PATH, "input.ogg");