Prince-Mendiratta / BotsApp

Your personal assistant, on WhatsApp! The most user friendly userbot for the platform!
GNU General Public License v3.0
5.5k stars 1.27k forks source link

Msg type buttton is not working #172

Open danillo10 opened 1 year ago

danillo10 commented 1 year ago

Today my bot dont work with msg type button, my user dont see the msg with button... the msg is send in my bot whatsapp i can see the msg, but my user dont see the msg, it's a whatsapp block ? Only msg buttons is not working, all others msg is working

buttons.push( {buttonId: 'id1', buttonText: {displayText: "Preciso contratar"}, type: 1}, {buttonId: 'id2', buttonText: {displayText: "Preciso trabalhar"}, type: 1}, {buttonId: 'id3', buttonText: {displayText: "Quero suporte"}, type: 1} );

                        const buttonMessage = {
                            text: "Bem-vindo ao Canal de Atendimento Serviços 24 Horas! Estamos felizes em atendê-lo. Aqui, resolvemos todas as suas necessidades, contando com a colaboração de milhares de profissionais em todo o país, como diaristas, pedreiros, advogados, profissionais de TI, psicólogos, garçons, serviços administrativos, entre outros. Todos os profissionais são rigorosamente selecionados e verificados por nossa plataforma, garantindo segurança e tranquilidade para você. Contratar um serviço é fácil e rápido, basta selecionar a opção desejada e aguardar nosso contato rápido. Experimente agora e tenha a solução para seus problemas a apenas alguns cliques de distância!",
                            buttons: buttons,
                            headerType: 1
                        }

                        client.sendMessage(BotsApp.chatId, buttonMessage, MessageType.buttonsMessage)
                            .then((data) => {
                                console.log(data)
                                // socket.emit('fromWhatsapp', {response: BotsApp.body, customer});
                                // customer.fromMe = true;
                                // customer.name = ownerName;
                                // socket.emit('fromCompany', {response: buttonMessage.text, customer});
                            })
                            .catch(err => console.log(err));