This commit is contained in:
Leifer Mendez
2022-02-03 23:21:42 +01:00
parent c7bc021f93
commit 4624cb6c60
7 changed files with 132 additions and 33 deletions

View File

@@ -36,14 +36,10 @@ const sendMessage = async (client, number = null, text = null, trigger = null) =
* Enviamos un mensaje con buttons a nuestro cliente
* @param {*} number
*/
const sendMessageButton = async (client, number = null, text = null, trigger = null) => {
const sendMessageButton = async (client, number = null, text = null, actionButtons) => {
number = cleanNumber(number)
const message = text
let button = new Buttons("holaaaa", [
{ body: "Leer" },
{ body: "SIII" }
], "ssssss", "foonooooter");
const { title = null, message = null, footer = null, buttons = [] } = actionButtons;
let button = new Buttons(message,[...buttons], title, footer);
client.sendMessage(number, button);
console.log(`⚡⚡⚡ Enviando mensajes....`);

16
controllers/socket.js Normal file
View File

@@ -0,0 +1,16 @@
module.exports = (socket) => {
return {
sendQR:(qr) => {
socket.emit('connection_qr',{
qr
})
},
sendStatus:() => {
socket.emit('connection_status',{
a:1
})
}
}
}