mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-20 12:39:24 +00:00
Retraso en el envío de botones
Modificado para que los botones sean enviados después del mensaje
This commit is contained in:
@@ -69,12 +69,14 @@ const sendMessage = async (client, number = null, text = null, trigger = null) =
|
|||||||
* @param {*} number
|
* @param {*} number
|
||||||
*/
|
*/
|
||||||
const sendMessageButton = async (client, number = null, text = null, actionButtons) => {
|
const sendMessageButton = async (client, number = null, text = null, actionButtons) => {
|
||||||
|
setTimeout(async () => {
|
||||||
number = cleanNumber(number)
|
number = cleanNumber(number)
|
||||||
const { title = null, message = null, footer = null, buttons = [] } = actionButtons;
|
const { title = null, message = null, footer = null, buttons = [] } = actionButtons;
|
||||||
let button = new Buttons(message,[...buttons], title, footer);
|
let button = new Buttons(message,[...buttons], title, footer);
|
||||||
client.sendMessage(number, button);
|
client.sendMessage(number, button);
|
||||||
|
await readChat(number, message, actionButtons)
|
||||||
console.log(`⚡⚡⚡ Enviando mensajes....`);
|
console.log(`⚡⚡⚡ Enviando mensajes....`);
|
||||||
|
}, DELAY_TIME)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user