Skip to content

NicoAcosta/whatsapp-heroku-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WhatsApp Heroku Bot

Uses Venom Bot library.

Deploying to heroku

  1. Fork this repo

  2. Clone it locally

git clone https://github.com/YOUR_GITHUB_USER_NAME/whatsapp-heroku-bot
  1. Enter the folder
cd whatsapp-heroku-bot
  1. (Optional) Install npm dependencies. Recommended if you're going to use venom-bot's features.
npm install
  1. If you haven't installed Heroku CLI yet, do it here.

  2. If you haven't logged in yet:

heroku login
  1. Create a new Heroku app
heroku create your-app-name
  1. Add @heroku's nodejs buildpack. Docs here.
heroku buildpacks:set heroku/nodejs
  1. Add @jontewks's puppeteer buildpack. Docs here.
heroku buildpacks:add jontewks/puppeteer
  1. Add a remote to your repo.
heroku git:remote -a your-app-name
  1. Deploy your app to Heroku. This might take a while.
git push heroku main
  1. Do
heroku logs

until you see the QR code. Scan it from WhatsApp in your phone.

  1. It should be working!

Running locally

  1. Fork this repo

  2. Clone it locally

git clone https://github.com/YOUR_GITHUB_USER_NAME/whatsapp-heroku-bot
  1. Enter the folder
cd whatsapp-heroku-bot
  1. Install npm dependencies
npm install
  1. Run index.js
node index.js

or

npm start
  1. Wait until you see the QR code. Scan it from WhatsApp in your phone.

  2. It should be working!

Venom Bot docs here.