Run the following code to clone the repo
> git clone https://github.com/Synthesized-Infinity/Whatsapp-Botto-Xre
> cd Whatsapp-Botto-Xre
Run this to install the depencencies
> npm i && npm i -D
Create a file named .env
then add the following fields
BOTNAME=Xre
PREFIX=!
CRON=null
SESSION_ID=PROD
ADMINS=
MONGO_URI=YOUR_CLUSTER_URI
EIF=https://express-is-fun.herokuapp.com/
ADMIN_GROUP_JID=
BOT_NAME
The name of the Bot
PREFIX
The Prefix of the Bot
CRON
Cron schedule for clearing all chats (Default: "0 */6 * * *"
. Every 6 Hours). change this field to null
if you don't want to schedule. Learn More
SESSION_ID
A string to keep track of your session.
ADMINS
The phone numbers of users wo you want to be the bot's Admins separated by a comma and must the numbers must be in the following format: [cc][number]
. eg: 919744******
MONGO_URI
is the Connection URL to your DB
To get the connection URL there are two ways
#1 Mongo Atlas and create an account
After you set up your account create a new Cluster
Then copy the connection url to your cluster
#2 If you don't want to use Mongo Atlas you can install MongoDB in your system and use the URI provided in .env.example
Follow the instructions here to install MongoDB in your system
EIF
is the main endpoint of the Express-is-fun APIs.
If you want the chatbot functionality add this url there: https://express-is-fun.herokuapp.com
. Leave it empty if you don't want the chatbot functionality
ADMIN_GROUP_JID
If this field is provided, the members of this group will automatically become admins (use the command id
to get the jid)
Run npm run build
and the Compiled JS files, Deceleration Files, Maps and Declaration Maps with their folder will appear in the dist
folder
npm start
Running the above command will start the bot. To authenticate scan the QR which shows up in the terminal or the link which is logged when the QR event fires using the WA-Web Scanner on your WhatsApp. Now you're on your own. Good Luck!