Skip to the content.

Installation

If you have previously scanned QR code and already have session.json or session.data.json file, it is strongly recommended to rename ‘session.json’ to ‘session.data.json’ and copy it into Valor Bot folder/repository.

Before you start: (necessary)

There are three ways to install:

Heroku (Server)

This allows for easier installation and Heroku is a server based, that’s mean bot keep active for 24×7 without your device up for all time.

Heroku Tutorial Video

Required Buildpack:

To Install:

  1. Create an account on GitHub [skip if already an account]
  2. Fork “Valor Bot” repository
  3. Create account on Heroku [skip if already an account]
  4. Create new app
  5. Enter app name, choose a region and create app
  6. Go to app Settings, click on Add buildpack and copy/paste all three mentioned above requried buildpack one by one and Save changes respectively
  7. Go to app Deploy, Connect to GitHub, click on Search, connect to .../valor repository, Enable Automatic Deploys and click on Deploy Branch
  8. Go to app Resources, turn ON worker node . under Free Dynos
  9. Click on More (top right corner) and click on View logs
  10. Scan QR code via WhatsApp [skip if you already copied session.data.json file into repository]

    (Step 10 is necessary to activate bot on your whatsapp, and currently bot only support Multi-device beta)

  11. Hurray! Bot successfully installed and ready to use. Type .menu or .help in whatsapp chat to access bot menu

    ⚠️ If any error comes, feel free raise an Issue

Termux (Android 7 or higher)

Termux is a local hardware based terminal, that’s mean it use device hardware to run bot and for that requires Termux app always active with good internet connection

Termux Tutorial Video

To Install:

  1. Download and install Termux app
  2. Open Termux app and type given below commands one by one in terminal
    $ pkg upgrade -y
    $ pkg install git -y
    $ pkg install yarn -y
    $ pkg install nodejs -y
    $ pkg install ffmpeg -y
    $ pkg install imagemagick -y
    $ git clone https://github.com/DineshValor/valor
    $ cd valor
    $ yarn
    $ bash start
    
  3. Scan QR code via WhatsApp [skip if you already copied session.data.json file into repository]
  4. Hurray! Bot successfully installed and ready to use. Type .menu or .help in whatsapp chat to access bot menu

    ⚠️ If any error comes, feel free raise an Issue

CMD (Windows 7 or higher)

CMD is a windows based local command prompt/terminal, which runs bot locally inside pc using it’s hardware

CMD Tutorial Video

Required Packages:

To Install:

  1. Open CMD (command prompt) and type given below commands one by one in command prompt/terminal
    git clone https://github.com/DineshValor/valor
    cd valor
    npm install
    npm update
    node .
    
  2. Hurray! Bot successfully installed and ready to use. Type .menu or .help in whatsapp chat to access bot menu

    ⚠️ If any error comes, feel free raise an Issue

Replit (Server) - [Recommend]

This allows for easier installation and Replit is a server based, that’s mean bot keep active for 24×7 without your device up for all time with help of uptimerobot.

Heroku Tutorial Video

To Install:

  1. (Steps will add soon…)

Optional Commands

Usage: node . [--options]

Heroku user: Targeted file is procfile

Commands Description Example
--autocleartmp Dispose automatically tmp folder contain files node . --autocleartmp
--autoread If enabled, all incoming messages will be marked as read node . --autoread
--session [file-name] Use another session with another name, default is session.data.json node . --session session.json
--self Run bot only for yourself node . --self
--prefix [prefixes] prefixes are seperated by each character Set prefix node . --prefix !
--db [server-url] Use external db instead of local db node . --db 'mongodb+srv://<username>:<pin>@valor-whatsapp-bot-md.vn0pr.mongodb.net/<path>?retryWrites=true&w=majority'
--restrict Enables restricted plugins
Group Administration add, kick
node . --restrict
--nyimak No bot, just print received messages and add users to database node . --nyimak
--server Used for Heroku or scan through website node . --server
--pconly Bot run only in private chat node . --pconly
--gconly Bot run only in group chat node . --gconly
--swonly If chat not from status, bot will ignore node . --swonly
--big-qr If small qr unicode doesn’t support node . --big-qr
--img Enable image inspector through terminal node . --img
--test Development Testing Mode node . --test
--trace conn.logger.level = ‘trace’ node . --trace
--debug conn.logger.level = ‘debug’ node . --debug