- Open a terminal or command prompt.
- Run the following code to clone the repository.
> git clone https://github.com/akm-akm/akm-whatsapp-bot.git
> cd akm-whatsapp-bot
- Run this to install the dependencies
> npm install
Edit file named .env.example
and replace the values with your own.
COINMARKETCAP_API_KEY
The API key of CoinMarketCap for crypto market data. (optional)
clientId
The client id from jdoodle.com for the run feature to compile code. (optional)
clientSecret
The client secret from jdoodle.com for the run feature to compile code. (optional)
OWNER_NUMBER
Your whatsapp number along with country code without + sign. (required)
WEBSITE_PASSWORD
The password you want to keep for the bot website. (required)
DEEPAI
The api key for nsfw detection in images from deepai. (optional)
LOCAL_DATABASE_URL
The url of the database. See below on how to get this. (required)
SEARCH_STICKER
The api from Rapid API if you want to use the search sticker (ss) feature. (optional)
Now save the file with the name .env
-
Use the postsgres installed in your pc
-
Use online database from any of the following providers:
- elephant sql or pantheon
- Copy the url of the database and add it in the LOCAL_DATABASE_URL field in the .env file.
- Running in development mode
> npm run dev
- Running in production mode
> npm run prod
- To start the bot, go to the URL shown on the terminal.
- Enter the password you set in the Environment variable.
- Click on start and scan the qr code shown on the website using the WA-Web Scanner on your WhatsApp.
- Now you're on your own. Good Luck!
- It will auto connect everytime you start the bot.
- Scan the qr code shown in the terminal using the WA-Web Scanner on your WhatsApp
- The bot will work in group in development mode if the commands start with /.
- eg.
/help
,/limit
,/rs
- Send
hi
to the bot in the inbox or hi along with prefix if in a group. - The bot will respond with
👋 hello
. - Send
help
to the bot in the inbox or help along with prefix if in a group. - The bot will respond with the menu.
- Default daily limit for a normal user is
70
messages. - Owner and bot moderators have no limit and they cannot be banned in groups.
- Owner and bot moderators have access to all group commands even if they are not admin in any group.
- Default daily group limit is
100
messages. - By default, abuse detection and nudity detection is on.
- Default minimum group size for the bot to work in it is
1
members. - These values can be changed only by the bot owner.
- When the bot is added to any group, it will auto assign any random prefix to it, which can be changed by group admins using
setprefix
command or prefix can be turned off usinguseprefix
command. - If deepai api key is added to the bot, the bot will detect nudity in the image and if it detects 50% nudity, it will not make a sticker.