This project is a simple yet powerful Node.js-based sticker bot for WhatsApp, leveraging the @whiskeysockets/baileys library for WhatsApp Web API interactions and sharp for image processing. It listens for specific trigger messages and responds by converting images sent to it into stickers, automatically sending these back to the chat.
- Automatic Sticker Conversion: Converts images sent with a specific trigger message into stickers.
- QR Code Authentication: Easy authentication process with WhatsApp Web using QR code scanning.
- Reconnection Handling: Automatically attempts to reconnect in case of connection loss.
- Message Logging: Logs incoming messages for debugging purposes.
Before you begin, ensure you have met the following requirements:
- Node.js installed on your machine (v14.x or later recommended).
- A WhatsApp account to authenticate with WhatsApp Web.
To install the WhatsApp Sticker Bot, follow these steps:
- Clone the repository to your local machine:
git clone <repository-url>
- Navigate into the project directory:
cd <project-directory>
- Install the required dependencies:
npm install
To start the bot, run the following command in your project directory:
node sticker.jsFollow the on-screen instructions to scan the QR code with your WhatsApp application to authenticate.
To keep the bot running in the background, you can use pm2. If you haven't installed pm2 yet, install it globally using npm:
npm install -g pm2Then, start the bot with pm2:
pm2 start sticker.jsContributions to the WhatsApp Sticker Bot are welcome. If you have a suggestion that would make this better, please fork the repository and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!