A powerful,fast and feature-rich WhatsApp bot created by the NexusCoders team.
- Easy to deploy on Render
- Customizable commands
- Rate limiting to prevent spam
- Logging system for easy debugging
- SQLite database for user management
- Weather information command
- Extensible command system
- Node.js (v14 or higher)
- npm (v6 or higher)
- A WhatsApp account
- OpenWeatherMap API key (for weather command)
-
Clone this repository:
git clone https://github.com/your-username/nexuscoders-whatsapp-bot.git cd nexuscoders-whatsapp-bot -
Install dependencies:
npm install -
Create a
.envfile in the root directory and add the following:SESSION_ID=your_session_id OPENWEATHER_API_KEY=your_openweathermap_api_key
- Follow the instructions to pair your WhatsApp account using the QR code or other provided methods.
- Once paired, you will receive a session ID. Copy this ID.
- Add the session ID to your
.envfile as shown in the installation step.
- Fork this repository to your GitHub account.
- Create a new Web Service on Render.
- Connect your forked GitHub repository.
- Set the following:
- Build Command:
npm install - Start Command:
npm start
- Build Command:
- Add the following environment variables:
SESSION_ID: The value you obtained from the session ID generation stepOPENWEATHER_API_KEY: Your OpenWeatherMap API key
- Deploy the app.
To start the bot locally:
npm start
The bot will now be active on your WhatsApp account. Use the prefix ! to interact with the bot (e.g., !help, !weather New York).
!help: List all available commands!ping: Check bot responsiveness!weather <city>: Get weather information for a city
- Create a new file in the
src/commandsfolder (e.g.,mycommand.js). - Use the following template:
module.exports = {
name: 'mycommand',
description: 'Description of my command',
execute(message, args) {
// Command logic here
},
};- The command will be automatically loaded and available for use.
You can modify the src/config.js file to change various settings such as the command prefix, rate limiting, and bot information.
We welcome contributions! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
For support, please open an issue on the GitHub repository or contact the NexusCoders team.