X-Asena is a powerful and versatile WhatsApp bot built using Node.js and the Baileys library. This bot offers a wide range of features and capabilities, making it an excellent choice for both personal and commercial use cases.
🚀 Deploy your X-Asena Bot on DigitalOcean and get $200 in free credits! Click the badge above to sign up and take advantage of this amazing offer. DigitalOcean's reliable and scalable cloud infrastructure ensures your bot runs smoothly, no matter how many users you have. Don't miss out on this opportunity to supercharge your WhatsApp experience!
Before installing X-Asena, ensure that you have the following dependencies installed on your system:
- FFmpeg
- Node.js
To deploy X-Asena on any shell, including Termux, follow these steps:
- Fork the X-Asena repository
- Edit the
config.js
file with your desired configuration details - Install the required dependencies by running the following commands:
npm install
npm install qrcode-terminal
npm install pm2 -g
- To scan the QR code and start the bot, run
npm start
- To connect using a pairing code, run
npm run code
. After pairing, runnpm start
again and scan the QR code - Country code is required for connecting via a pairing code. If you are from India, you can use
91
as the country code. If you are from any other country, use your respective country code. - To stop the bot, press
Ctrl+C
- To start the bot, run
npm start
X-Asena supports custom plugins, which can be created using the following template:
const { command, isPrivate } = require("../../lib/");
command({
pattern: "ping", // Command pattern
fromMe: isPrivate, // true: only from sudo numbers, false: from everyone, isPrivate: private mode
desc: "To check ping", // Description of the command
type: "user", // Command type
}, async (message, match) => {
/* PLUGIN CONTENT HERE */
});
To reply to a message, use the following code:
message.reply("Hi");
To send media (image, audio, or video), use the following code:
let content = "https://wallpaperaccess.com/full/5531321.jpg"; // Can also use a buffer
message.sendMessage(jid, content, {} /* options */, "image" /* change to 'audio' or 'video' when sending audio or video */);
To send a sticker, use the following code:
message.sendMessage(jid, "url or buffer of image or video (max 10 seconds)", { packname: config.PACKNAME, author: config.AUTHOR }, "sticker");
X-Asena supports external plugins. You can find more information about external plugins in the Plugins wiki.
Join the official WhatsApp group for X-Asena to get support, ask questions, and interact with other users:
We welcome contributions from everyone, especially during Hacktoberfest 2024! If you're looking to contribute and gain experience in open source, this is a great time to do so. Here’s how to get involved:
- Check out issues labeled with
hacktoberfest
orgood first issue
to find a starting point. - Fork the repository, make your changes, and submit a pull request.
- Follow our Contributing Guidelines to ensure your contributions are in line with the project.
Your contributions help improve X-Asena and make it better for everyone!
X-Asena was created and is maintained by X-Electra.
X-Asena is licensed under the MIT License:
MIT License
Copyright (c) 2023 X-Electra
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.