{"id":15177535,"url":"https://github.com/haroldeustaquio/WhatsApp-js-Bot","last_synced_at":"2025-10-26T16:30:44.366Z","repository":{"id":256921181,"uuid":"856823394","full_name":"haroldeustaquio/WhatsApp-js-Bot","owner":"haroldeustaquio","description":"Automation bot for sending messages and file attachments via WhatsApp, using whatsapp-web.js for real-time alerts and scheduled notifications.","archived":false,"fork":false,"pushed_at":"2024-11-18T03:58:50.000Z","size":22,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-18T04:31:20.579Z","etag":null,"topics":["automation","bot","dabase","js","python","selenium","selenium-python","selenium-webdriver","sql","whatsapp","whatsapp-api-node","whatsapp-bot","whatsapp-web","whatsapp-web-js"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haroldeustaquio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-13T09:19:23.000Z","updated_at":"2024-11-18T04:00:53.000Z","dependencies_parsed_at":"2024-09-13T23:05:05.920Z","dependency_job_id":"9366a1a3-8331-45cb-b6f2-361fd45fea88","html_url":"https://github.com/haroldeustaquio/WhatsApp-js-Bot","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"be53a3a5f261f11270d1cd337ec6771063822e93"},"previous_names":["haroldeustaquio/alert-system-whatsapp","haroldeustaquio/whatsapp-js-bot"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haroldeustaquio%2FWhatsApp-js-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haroldeustaquio%2FWhatsApp-js-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haroldeustaquio%2FWhatsApp-js-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haroldeustaquio%2FWhatsApp-js-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haroldeustaquio","download_url":"https://codeload.github.com/haroldeustaquio/WhatsApp-js-Bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238117617,"owners_count":19419266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","bot","dabase","js","python","selenium","selenium-python","selenium-webdriver","sql","whatsapp","whatsapp-api-node","whatsapp-bot","whatsapp-web","whatsapp-web-js"],"created_at":"2024-09-27T14:40:20.087Z","updated_at":"2025-10-26T16:30:39.096Z","avatar_url":"https://github.com/haroldeustaquio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WhatsApp js Bot\n\n## Overview\nThis repository is focused on automating and monitoring the process of sending messages and file attachments through WhatsApp. It leverages the `whatsapp-web.js` API for message delivery while introducing modular tools for both sending and tracking messages. These solutions are ideal for automating communication tasks, ensuring accurate and timely delivery.\n\n**Content**:\n- [Message Sender](#message-sender)\n  - [Key Features](#key-features)\n  - [File Structure](#file-structure)\n- [Message Monitor](#message-monitor)\n  - [Key Features](#key-features-1)\n  - [File Structure](#file-structure-1)\n- [Installation](#installation)\n\n\n---\n\n## Message Sender\n\nThe **`Message Sender`** script automates the sending of messages and files through WhatsApp. It is designed for scenarios requiring periodic updates or alerts to specific numbers or groups.\n\n### Key Features\n- **QR Code Login**: Authenticate using WhatsApp Web by scanning a QR code.\n- **Automated Text and File Sending**: Sends predefined messages and file attachments to the target number or group.\n- **Session Keep Alive**: Uses a keep-alive mechanism to prevent session timeouts during prolonged use.\n\n### File Structure\n- **``whatsapp-client.js``**: Manages WhatsApp client initialization, QR code authentication, and triggers periodic sending of messages and files.\n- **``sendMessage.js``**: Contains the function for sending text messages to a WhatsApp number.\n- **``sendFile.js``**: Handles file attachments to be sent to a specific number or group.\n- **``keepAlive.js``**: Keeps the session active by periodically logging the connection status.\n\n---\n\n## Message Monitor\n\nThe **`Message Monitor`** script tracks messages sent by the **`Message Sender`** to ensure they are delivered on time. It validates timing against predefined intervals and tolerances.\n\n### Key Features\n- **Real-Time Monitoring**: Tracks outgoing messages to the target number in real time.\n- **Message Validation**:\n  - Logs whether messages are sent on time, late, or not at all.\n  - Differentiates between missed and delayed messages for detailed tracking.\n- **Session Management**: Ensures continuous operation by keeping the session active.\n\n### File Structure\n- **``whatsapp-monitor.js``**: Initializes the WhatsApp client and implements message tracking based on intervals and tolerances.\n- **``sendMessage.js``**: Sends alert messages for missed or late messages.\n- **``keepAlive.js``**: Maintains session stability during monitoring.\n\n---\n\n## Installation\n\nEnsure you have **`Node.js`** installed on your system.\n\n### 1. **Clone the repository**:\n\n  ```bash\n  git clone https://github.com/haroldeustaquio/WhatsApp-js-Bot.git\n  ```\n\n### 2. **Navigate to the desired module**:\n\n* For **``Message Sender``**:\n  ```bash\n  cd message-sender\n  ```\n\n* For **``Message Monitor``**:\n  ```bash\n  cd message-monitor\n  ```\n\n### 3. **Install dependencies**:\n\n  ```bash\n  npm install whatsapp-web.js qrcode-terminal fs\n  ```\n\n### 4. **Run the desired script**:\n\n* For **``Message Sender``**:\n  ```bash\n  node whatsapp-client.js\n  ```\n\n* For **``Message Monitor``**:\n  ```bash\n  node whatsapp-monitor.js\n  ```\n\n### 5. **Scan QR code**:\n\nOnce the bot starts, scan the QR code displayed in the terminal with the WhatsApp app to log in.\n\n\n---\n\n\u003cdiv align=\"center\"\u003e \n  \u003cem\u003e \n    We believe in the power of collaboration. If you have ideas, suggestions, or improvements, feel free to open an issue or submit a pull request. Let’s make this project even better—your contributions are always welcome! \n  \u003c/em\u003e \n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharoldeustaquio%2FWhatsApp-js-Bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharoldeustaquio%2FWhatsApp-js-Bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharoldeustaquio%2FWhatsApp-js-Bot/lists"}