GithubHelp home page GithubHelp logo

Comments (12)

andersondeoliveiramachado avatar andersondeoliveiramachado commented on May 13, 2024 7

template_button.txt

[
{
"id": {
"fromMe": false,
"remote": "[email protected]",
"id": "91875E65606A66D4EA",
"_serialized": "[email protected]_91875E65606A66D4EA"
},
"body": "Confirma para mim o seu nome completo: menu principal, está correto(a)?",
"type": "template",
"subtype": "text",
"t": 1580956051,
"notifyName": "",
"from": "[email protected]",
"to": "[email protected]",
"self": "in",
"ack": 0,
"invis": true,
"star": false,
"caption": "Confirma para mim o seu nome completo: menu principal, está correto(a)?",
"broadcast": false,
"mentionedJidList": [],
"buttons": [
{
"id": "0",
"displayText": "Sim, está correto(a)",
"subtype": "quick_reply",
"selectionId": "{"eventName":"yes"}"
},
{
"id": "1",
"displayText": "Não, quero corrigir",
"subtype": "quick_reply",
"selectionId": "{"eventName":"no"}"
}
],
"isForwarded": false,
"labels": []
},
{
"id": {
"fromMe": false,
"remote": "[email protected]",
"id": "96BA2DB14292993A26",
"_serialized": "[email protected]_96BA2DB14292993A26"
},
"body": "Para continuar precisamos de algumas informações.\nGostaria de informar os dados ou enviar uma foto da CNH/RG e nós coletamos os dados da imagem da CNH/RG?",
"type": "template",
"subtype": "text",
"t": 1580944973,
"notifyName": "",
"from": "[email protected]",
"to": "[email protected]",
"self": "in",
"ack": 0,
"invis": true,
"star": false,
"caption": "Para continuar precisamos de algumas informações.\nGostaria de informar os dados ou enviar uma foto da CNH/RG e nós coletamos os dados da imagem da CNH/RG?",
"broadcast": false,
"mentionedJidList": [],
"buttons": [
{
"id": "0",
"displayText": "Informar dados",
"subtype": "quick_reply",
"selectionId": "{"eventName":"inform"}"
},
{
"id": "1",
"displayText": "Enviar foto RG",
"subtype": "quick_reply",
"selectionId": "{"eventName":"event-rg"}"
},
{
"id": "2",
"displayText": "Enviar foto CNH",
"subtype": "quick_reply",
"selectionId": "{"eventName":"event-cnh"}"
}
],
"isForwarded": false,
"labels": []
},
{
"id": {
"fromMe": true,
"remote": "[email protected]",
"id": "3EB023CE6F1611ADA489",
"_serialized": "[email protected]_3EB023CE6F1611ADA489"
},
"body": "Informar dados",
"type": "template_button_reply",
"t": 1580945117,
"notifyName": "",
"from": "[email protected]",
"to": "[email protected]",
"self": "in",
"ack": 2,
"invis": true,
"star": false,
"quotedMsg": {
"type": "chat",
"body": "Para continuar precisamos de algumas informações.\nGostaria de informar os dados ou enviar uma foto da CNH/RG e nós coletamos os dados da imagem da CNH/RG?"
},
"quotedStanzaID": "96BA2DB14292993A26",
"quotedParticipant": "[email protected]",
"mentionedJidList": [],
"selectedId": "{"eventName":"inform"}",
"selectedIndex": 0,
"labels": []
},
{
"id": {
"fromMe": true,
"remote": "[email protected]",
"id": "3EB092A0BDF2B11FFF60",
"_serialized": "[email protected]_3EB092A0BDF2B11FFF60"
},
"body": "Enviar foto RG",
"type": "template_button_reply",
"t": 1580956019,
"notifyName": "",
"from": "[email protected]",
"to": "[email protected]",
"self": "in",
"ack": 2,
"invis": true,
"star": false,
"quotedMsg": {
"type": "chat",
"body": "Para continuar precisamos de algumas informações.\nGostaria de informar os dados ou enviar uma foto da CNH/RG e nós coletamos os dados da imagem da CNH/RG?"
},
"quotedStanzaID": "96BA2DB14292993A26",
"quotedParticipant": "[email protected]",
"mentionedJidList": [],
"selectedId": "{"eventName":"event-rg"}",
"selectedIndex": 1,
"labels": []
}
]

from whatsapp-web.js.

iamshouvikmitra avatar iamshouvikmitra commented on May 13, 2024 6

Any further developments? Really excited to get this one!

from whatsapp-web.js.

pedroslopez avatar pedroslopez commented on May 13, 2024 5

Oh wow this is really interesting. Will definitely look In to this as well!

from whatsapp-web.js.

aliyss avatar aliyss commented on May 13, 2024

Nice one. I will look into it.

from whatsapp-web.js.

andersondeoliveiramachado avatar andersondeoliveiramachado commented on May 13, 2024

in another project here at git, some progress has been made with this type of message. But it seems that whatsapp blocks when it is sent to.

https://github.com/smashah/sulla/blob/82ee145b9d83222aa506ff3bfc72a9aacd9164da/src/lib/wapi.js#L1692

from whatsapp-web.js.

byeze avatar byeze commented on May 13, 2024

I would love to have this!

from whatsapp-web.js.

esteves67 avatar esteves67 commented on May 13, 2024

Those messages with buttons looks awesome! Hope we can use that in this library in the future!

Edit:
As said on open-wa library, this feature is impossible to have at the moment, because it needs WhatsApp Oficial API (paid) to use those buttons, so its a feature that whatsapp doesn't permit normal business users to use, only those business accounts that pay alot of money to have the official api.
open-wa/wa-automate-nodejs#98

from whatsapp-web.js.

PurpShell avatar PurpShell commented on May 13, 2024

As of now, you can only view messages in buttons (msg.buttons), each button has it's own ID and the button layout itself has to be verified by whatsapp moderators before being assigned an ID.

Closing this issue, you are welcome to open it again if you think this was done in error.

Links:

Best regards,

PurpShell

from whatsapp-web.js.

 avatar commented on May 13, 2024

https://github.com/adiwajshing/Baileys

this project seems to have had a great advance in this regard.

from whatsapp-web.js.

PurpShell avatar PurpShell commented on May 13, 2024

The thing you are referring to is not relevant here, the advance they made is in a legacy version of the template message, called a button message. those are two different things, though they might seem similar. #756 has done this greatly so far, if that's what you wish for.

from whatsapp-web.js.

roysG avatar roysG commented on May 13, 2024

So how do this library allow the template buttons with regular/business whatsapp?

https://github.com/adiwajshing/Baileys

from whatsapp-web.js.

antoniocesar16 avatar antoniocesar16 commented on May 13, 2024

Very nicee!

from whatsapp-web.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.