From e8aed880d8c9b89e67df52c99a88309be5f68a13 Mon Sep 17 00:00:00 2001 From: HKong31 <113340082+HKong31@users.noreply.github.com> Date: Wed, 7 Dec 2022 12:19:06 -0400 Subject: [PATCH] =?UTF-8?q?Retraso=20en=20el=20env=C3=ADo=20de=20botones?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modificado para que los botones sean enviados después del mensaje --- controllers/send.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/send.js b/controllers/send.js index d081381..5cda9ac 100644 --- a/controllers/send.js +++ b/controllers/send.js @@ -69,12 +69,14 @@ const sendMessage = async (client, number = null, text = null, trigger = null) = * @param {*} number */ const sendMessageButton = async (client, number = null, text = null, actionButtons) => { + setTimeout(async () => { number = cleanNumber(number) const { title = null, message = null, footer = null, buttons = [] } = actionButtons; let button = new Buttons(message,[...buttons], title, footer); client.sendMessage(number, button); - + await readChat(number, message, actionButtons) console.log(`⚡⚡⚡ Enviando mensajes....`); + }, DELAY_TIME) }