Don't get excited yet, this ******* only send a whatsapp message when someone connects in any voice chat.
Thanks for this guy who made this https://github.com/chrishubert/whatsapp-web-api.git
; I just did a simple discord listener.
- Get containers up.
docker compose up
- Make a session on whatsapp web, go to: http://localhost:3000/session/start/DISC_WPP_SESSION
Should return:
{"success":true,"message":"Session initiated successfully"}
- On your whatsapp_web_api container logs, it will appear a QRCODE, you already know what to do.
docker logs whatsapp_web_api
- You have to know the chat id or contact id you want to send the message, you can list contacts with:
{
"id":{
"server":"g.us",
"user":"123123123123-123123123123",
"_serialized":"123123123123-123123123123@g.us" #you need this
},
"number":null,
"isBusiness":false,
"isEnterprise":false,
"name":"GROUP NAME OR CONTACT",
"type":"in",
"isMe":false,
"isUser":false,
"isGroup":true,
"isWAContact":false,
"isMyContact":false,
"isBlocked":false
}
- Now you have to change the environment variables on docker-compose.yaml
Key | Value |
---|---|
CHAT_ID | _serialized extracted from contacts |
DISC_TOKEN | Your discord bot token (Make sure your bot have needed permissions) |
- Now try (: