From 612b0f47af4e6581050c53703ff929d3cb3fa2d1 Mon Sep 17 00:00:00 2001 From: Simone Gallo Date: Thu, 18 Apr 2024 12:47:22 +0200 Subject: [PATCH] add send-message info --- main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 4e1478e..1a2b2ae 100644 --- a/main.js +++ b/main.js @@ -25,8 +25,6 @@ client.on('qr', qr => { // Listening to all incoming messages client.on('message_create', message => { console.log(message.body); - // console.log(message) - // sendMessage(message.from, 'Olá! Estou ocupado agora, mas assim que possível entrarei em contato.'); }); function sendMessage(number, message) { @@ -34,6 +32,9 @@ function sendMessage(number, message) { } app.post('/send-message', (req, res) => { + /* + This function only accepts numbers formatted as: [CountryCode][Number]@c.us // Example: 39333555887@c.us + */ const { number, message } = req.body; if (!number || !message) { return res.status(400).send('Number and message are required');