Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Buttons not working!!!!! #2737

Open
matheusbsant opened this issue May 8, 2024 · 3 comments
Open

Send Buttons not working!!!!! #2737

matheusbsant opened this issue May 8, 2024 · 3 comments
Labels
bug Something isn't working needs triage Needs avaliation

Comments

@matheusbsant
Copy link

matheusbsant commented May 8, 2024

I'm trying to use the sendButtons function, but it's throwing an error:

Error when sending:  {
  erro: true,
  text: 'It is necessary to write a subtitle!',
  status: 404
}.

Even though the function is being called correctly, identical to the example provided by the library:

const buttons = [
        {
          "buttonText": {
            "displayText": "Text of Button 1"
          }
        },
        {
          "buttonText": {
            "displayText": "Text of Button 2"
          }
        }
      ]
      await client.sendButtons(customerPhone2, 'Title', 'Description', buttons)
        .then((result) => {
          console.log('Result: ', result); //return object success
        })
        .catch((erro) => {
          console.error('Error when sending: ', erro); //return object error
        });. 

Does anyone have any suggestions or any idea why this is happening?

@matheusbsant matheusbsant added bug Something isn't working needs triage Needs avaliation labels May 8, 2024
@ghayman
Copy link
Contributor

ghayman commented May 9, 2024

I've made fix but I have no setup ready to test this function
#2738

Please install from
npm install github:ghayman/venom#sendButtons-not-working
and see if it fixes your problem

@michaliakobashvili
Copy link

michaliakobashvili commented Aug 25, 2024

hello, when i install github:ghayman/venom#sendButtons-not-working i have error:
"TypeError: window.WAPI.waitNewAcknowledgements is not a function"
and now the subtitle is not an isue but
"Error when sending: {me: {…}, to: {…}, erro: true, text: null, status: {…}}
index.js:194
arg1 =
{me: {…}, to: {…}, erro: true, text: null, status: {…}}"
Then i install npm install github:ghayman/venom#window.WAPI.waitNewAcknowledgements-is-not-a-function
then the error is
'It is necessary to write a subtitle!'
@ghayman

@tech4doctors
Copy link

await client.sendButtons(customerPhone2, 'Title', buttons, 'Description')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Needs avaliation
Projects
None yet
Development

No branches or pull requests

4 participants