gpt-4o-mini-2024-07-18· OpenAI
WildChat-4.8M (AI2)
Organize este código: respostaMsg += 📞 Contato:…
- User
Organize este código:
respostaMsg += `📞 *Contato:* ${item.dadosCompletos.contatos.telefones.length > 0 ? item.dadosCompletos.contatos.telefones.map(t => `${t.ddd} ${t.numero}`).join(", ") : "Não disponível"}\n\n`; }); reply(respostaMsg.trim()); } catch (error) { console.error("Erro ao consultar telefone:", error); reply("❌ Erro ao buscar informações. Tente novamente mais tarde."); } break;default:
// Captura respostas (1 a 5) automaticamente sem precisar de um comando específico if (["1", "2", "3", "4", "5"].includes(budy.trim())) { if (jogosAkinator[from]) { let aki = jogosAkinator[from];
try { await aki.answer(parseInt(budy) - 1); akiData[from].progresso = aki.progress; akiData[from].ultima_pergunta = aki.question; akiData[from].timestamp = Date.now(); fs.writeFileSync('./aki.json', JSON.stringify(akiData, null, 2)); if (aki.progress >= 95 || aki.isWin) { let nomePersonagem = aki.sugestion_name || "desconhecido"; let descricao = aki.sugestion_desc || "Nenhuma descrição disponível."; let foto = aki.sugestion_photo ? `📷 Foto: ${aki.sugestion_photo}` : ""; reply(`🎉 O Akinator acha que você pensou em: *${nomePersonagem}*\nℹ️ ${descricao}\n${foto}`); // Remove o jogo da memória após 1 hora setTimeout(() => { delete akiData[from]; delete jogosAkinator[from]; fs.writeFileSync('./aki.json', JSON.stringify(akiData, null, 2)); }, 3600000); } else { setTimeout(() => { reply(`🤔 Pergunta: ${aki.question} (Progresso: ${aki.progress}%)\n\n1️⃣ Sim\n2️⃣ Não\n3️⃣ Não sei\n4️⃣ Provavelmente\n5️⃣ Provavelmente não`); }, 2000); } } catch (error) { - Assistant