fix buttons

This commit is contained in:
Leifer Mendez
2022-02-23 15:55:56 +01:00
parent e23540593a
commit 902431c533
2 changed files with 22 additions and 3 deletions

13
app.js
View File

@@ -97,9 +97,18 @@ const listenMessage = () => client.on('message', async msg => {
console.log({ step })
if (step) {
const response = await responseMessages(step)
const response = await responseMessages(step);
/**
* Si quieres enviar botones
*/
await sendMessage(client, from, response.replyMessage, response.trigger);
if(response.hasOwnProperty('actions')){
const { actions } = response;
await sendMessageButton(client, from, null, actions);
return
}
if (!response.delay && response.media) {
sendMedia(client, from, response.media);