From 85affa20386d9a37c70c3aef667a5c871e7bab0d Mon Sep 17 00:00:00 2001 From: danil Date: Mon, 15 Jul 2024 17:51:10 +0500 Subject: [PATCH] fix --- supabase/functions/neuro-calls/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supabase/functions/neuro-calls/index.ts b/supabase/functions/neuro-calls/index.ts index b492676..0459726 100644 --- a/supabase/functions/neuro-calls/index.ts +++ b/supabase/functions/neuro-calls/index.ts @@ -812,7 +812,10 @@ botNeuroCalls.on("message:text", async (ctx: Context) => { const telegram_id = ctx.from?.id.toString() if (!telegram_id) throw new Error("No telegram_id") const voice_id_synclabs = await getVoiceId(telegram_id) - if (!voice_id_synclabs) throw new Error("No voice_id_synclabs") + if (!voice_id_synclabs) { + await ctx.reply(lang ? "🔮 Вы еще не присвоили голос аватару. Либо дождитесь пока вам придет ответ о том что ваш Voice ID успешно присвоен. " : "🔮 You haven't assigned a voice to your avatar yet. Or wait for an answer about your Voice ID being successfully assigned.") + return + } if (!query) throw new Error("No query") const speech = await createSpeech(query, voice_id_synclabs) console.log(speech, "speech")