Open WABOT is a WhatsApp bot designed to be as lightweight as possible using the Baileys module.
Here are the instructions for installing Open WABOT on multiple platforms.
-
Install nodejs, npm, and git.
sudo pacman -S nodejs npm git
-
Clone the Open WABOT repository.
git clone https://github.com/Ismananda/open-wabot
-
Navigate to the
open-wabot
directory and runnpm install
.cd open-wabot npm install
-
Install curl and git.
sudo apt-get install -y curl git
-
Download and run the Node.js setup.
curl -fsSL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh sudo -E bash nodesource_setup.sh sudo apt-get install -y nodejs
-
Clone the Open WABOT repository.
git clone https://github.com/Ismananda/open-wabot
-
Navigate to the
open-wabot
directory and runnpm install
.cd open-wabot npm install
For configuration, copy config-sample.js
to config.js
in the root directory. Then, adjust the configuration as needed.
module.exports = {
// Debug mode configuration
debug: false, // Set to true to enable debug mode
// Anti-call feature configuration
antiCall: true, // Set to true to enable anti-call feature
// Pairing mode configuration
usePairing: false, // Set to true to use pairing mode
// Prefix configuration
prefixes: ["!", ">", "$", ".", "-", "+", "?", "#", "@", "/", "&", ",", "ow!"], // Add the character you want to use as a prefix
// Session configuration
session: {
type: "local", // Options: "mongodb", "local"
url: "mongodb://username:password@host:port/database?options" // Required for MongoDB (optional)
},
// Bot information
botName: "Open WABOT", // Name of the bot
botNumber: "6285176765422", // Phone number of the bot
// Administrators list
administrator: [
"6281654976901", // Phone number of the first administrator
"6285175023755" // Phone number of the second administrator
],
// Whitelist configuration
whitelist: false, // Set to true to enable whitelist feature
whitelistSrv: "http://localhost:8080/whitelist", // Servers that provide whitelists
whitelistMsg: "You are not allowed to use this bot", // Messages to be sent to users when they are not allowed to use bots
whitelistUsr: [
"6285176765422" // Phone number of the whitelisted user
]
};
To use MongoDB sessions, please follow these steps:
-
Install MongoDB session driver
Run the following command to install the MongoDB session driver:npm run install:mongo
-
Configure MongoDB URL
Add your MongoDB URL to the configuration like this:session: { type: "mongodb", url: "mongodb://username:password@host:port/database?options", },
Example:
session: { type: "mongodb", url: "mongodb://myUser:myPassword@localhost:27017/myDatabase?retryWrites=true&w=majority", },
-
Start the bot
Start the bot with the following command:npm start
The numbers entered into the whitelist array in the configuration file are permanent until the configuration file is changed. If you want to add a whitelist within a certain period of time, you can use the following command.
.whitelist <phone> <duration in days>
Example:
.whitelist 6285176765422 30
In the whitelist configuration, Srv can be filled with a server url that will receive and return json data as follows.
Data to be received by the server.
{
"user": "6285176765422"
}
Data to be returned by the server.
{
"whitelisted": true
}
{
"whitelisted": true
}
Run the bot with the command
node controller.js
To add a plugin, please use the following format:
module.exports = {
admin: false, // Is the plugin administrator-only
name: 'name', // Added feature names
alias: ['alias1', 'alias2'], // Other names of the feature can be used as alternative commands
category: 'test', // Categories of added features
run: async (m, plugins) => {
// Here is your code
m.reply(result)
}
}
This project is licensed under the terms of the LICENSE file.
![]() Ismananda Author of open-wabot |
![]() Rusdi Greyrat General assistant |
![]() WhiskeySockets - Baileys Library used |
![]() Adhiraj Singh Baileys Founder |
![]() Amirul Dev Author of mongodb session |