WhatsApp bot using whatsapp-web.js.
Using MongoDB and mongoose to store list message and reply
- Install Dependecies
npm install
- Database seeds. Example of
autoreplies
collection to mention the message sender. Here@{mention}
will be replaced by@{contact.user.id}
{ "message": "!hi", "reply": "hello @{mention}", "created_at": { "$date": { "$numberLong": "1665014400000", }, }, "updated_at": { "$date": { "$numberLong": "1665070380000", }, }, }
- Run the app
npm start
- Scan QR Code shown in terminal
npm test
docker-compose up -d
where mongodb_container is the container name
sudo docker exec -it mongodb_container bash
Enter this to switch to your database
use datbaseName