Skip to content

Commit

Permalink
Updated Code
Browse files Browse the repository at this point in the history
  • Loading branch information
DaggieBlanqx committed Jun 22, 2022
1 parent 8b7e88f commit cc26ec8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ await Whatsapp.sendAudio({
});
```

#### Send a list of buttons to the recipient (max number of buttons allowed are 3)
#### Send a list of simple buttons to the recipient (max number of buttons allowed are 3)

```js
await Whatsapp.sendButtons({
await Whatsapp.sendSimpleButtons({
recipientPhone: 'your recipient phone number here',
message: `How may I help you today`,
listOfButtons: [
Expand All @@ -216,7 +216,7 @@ await Whatsapp.sendButtons({
#### Send a list of radio buttons to a recipient: (max number of radio buttons allowed are 10)

```js
await Whatsapp.sendList({
await Whatsapp.sendRadioButtons({
recipientPhone: 'your recipient phone number here',
headerText: 'Black Friday Top 10 Products',
bodyText:
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ class WhatsappCloud {
};
}

async sendButtons({ recipientPhone, message, listOfButtons }) {
async sendSimpleButtons({ recipientPhone, message, listOfButtons }) {
this._mustHaveMessage(message);
this._mustHaverecipientPhone(recipientPhone);
let validButtons = listOfButtons
Expand Down Expand Up @@ -317,7 +317,7 @@ class WhatsappCloud {
return response;
}

async sendList({
async sendRadioButtons({
recipientPhone,

headerText,
Expand Down

0 comments on commit cc26ec8

Please sign in to comment.