Venom is a high-performance system developed with JavaScript to create a bot for WhatsApp, support for creating any interaction, such as customer service, media sending, sentence recognition based on artificial intelligence and all types of design architecture for WhatsApp.
It's a high-performance alternative API to whatsapp, you can send, text messages, files, images, videos and more.
Remember, the API was developed on a platform called RESTful Web services, providing interoperability between computer systems on the Internet.
It uses a set of well-defined operations that apply to all information resources: HTTP itself defines a small set of operations, the most important being POST, GET, PUT and DELETE.
Use it in your favorite language like PHP, Python, C# and others. as long as your language is supported with the HTTP protocol, you will save time and money. you don't need to know how Venom works, we have the complete API documentation, in a professional way!
SuperChats is a premium library with unique features that control Whatsapp functions with socket. With Superchats you can build service bots, multiservice chats or any system that uses Whatsapp
Superchats is a premium version of Venom, with exclusive features and support for companies and developers worldwide
https://github.com/orkestral/superchats
The value of the license is $50 monthly dollars, to acquire contact in whatsapp by clicking on the image below !!
| 🚻 Automatic QR Refresh | ✔ |
| 📁 Send text, image, video, audio and docs | ✔ |
| 👥 Get contacts, chats, groups, group members, Block List | ✔ |
| 📞 Send contacts | ✔ |
| Send Buttons | ✔ |
| Send stickers | ✔ |
| Send stickers GIF | ✔ |
| Multiple Sessions | ✔ |
| ⏩ Forward Messages | ✔ |
| 📥 Receive message | ✔ |
| 👤 insert user section | ✔ |
| 📍 Send location!! | ✔ |
| 🕸🕸 and much more | ✔ |
Documentation at https://orkestral.github.io/venom/index.html
> npm i --save venom-bot
or for Nightly releases:
> npm i --save https://github.com/orkestral/venom/releases/download/nightly/venom-bot-nightly.tgz
Installing the current repository "you can download the beta version from the current repository!"
> npm i github:orkestral/venom
// Supports ES6
// import { create, Whatsapp } from 'venom-bot';
const venom = require('venom-bot');
venom
.create({
session: 'session-name' //name of session
})
.then((client) => start(client))
.catch((erro) => {
console.log(erro);
});
function start(client) {
client.onMessage((message) => {
if (message.body === 'Hi' && message.isGroupMsg === false) {
client
.sendText(message.from, 'Welcome Venom 🕷')
.then((result) => {
console.log('Result: ', result); //return object success
})
.catch((erro) => {
console.error('Error when sending: ', erro); //return object error
});
}
});
}
create() function, venom will create an instance of whatsapp web. If you are not logged in, it will print a QR code in the terminal. Scan it with your phone and you are ready to go!create() function:// Init sales whatsapp bot
venom.create('sales').then((salesClient) => {...});
// Init support whatsapp bot
venom.create('support').then((supportClient) => {...});
Venom create() method third parameter can have the following optional parameters:
If you are using the Linux server do not forget to pass the args --user-agent
Original parameters in browserArgs
const venom = require('venom-bot');
venom
.create(
//session
'sessionName', //Pass the name of the client you want to start the bot
//catchQR
(base64Qrimg, asciiQR, attempts, urlCode) => {
console.log('Number of attempts to read the qrcode: ', attempts);
console.log('Terminal qrcode: ', asciiQR);
console.log('base64 image string qrcode: ', base64Qrimg);
console.log('urlCode (data-ref): ', urlCode);
},
// statusFind
(statusSession, session) => {
console.log('Status Session: ', statusSession); //return isLogged || notLogged || browserClose || qrReadSuccess || qrReadFail || autocloseCalled || desconnectedMobile || deleteToken || chatsAvailable || deviceNotConnected || serverWssNotConnected || noOpenBrowser || initBrowser || openBrowser || connectBrowserWs || initWhatsapp || erroPageWhatsapp || successPageWhatsapp || waitForLogin || waitChat || successChat
//Create session wss return "serverClose" case server for close
console.log('Session name: ', session);
},
// options
{
browserPathExecutable: '', // browser executable path
folderNameToken: 'tokens', //folder name when saving tokens
mkdirFolderToken: '', //folder directory tokens, just inside the venom folder, example: { mkdirFolderToken: '/node_modules', } //will save the tokens folder in the node_modules directory
headless: 'new', // you should no longer use boolean false or true, now use false, true or 'new' learn more https://developer.chrome.com/articles/new-headless/
devtools: false, // Open devtools by default
debug: false, // Opens a debug session
logQR: true, // Logs QR automatically in terminal
browserWS: '', // If u want to use browserWSEndpoint
browserArgs: [''], // Original parameters ---Parameters to be added into the chrome browser instance
addBrowserArgs: [''], // Add broserArgs without overwriting the project's original
puppeteerOptions: {}, // Will be passed to puppeteer.launch
disableSpins: true, // Will disable Spinnies animation, useful for containers (docker) for a better log
disableWelcome: true, // Will disable the welcoming message which appears in the beginning
updatesLog: true, // Logs info updates automatically in terminal
autoClose: 60000, // Automatically closes the venom-bot only when scanning the QR code (default 60 seconds, if you want to turn it off, assign 0 or false)
createPathFileToken: false, // creates a folder when inserting an object in the client's browser, to work it is necessary to pass the parameters in the function create browserSessionToken
addProxy: [''], // Add proxy server exemple : [e1.p.webshare.io:01, e1.p.webshare.io:01]
userProxy: '', // Proxy login username
userPass: '' // Proxy password
},
// BrowserInstance
(browser, waPage) => {
console.log('Browser PID:', browser.process().pid);
waPage.screenshot({ path: 'screenshot.png' });
}
)
.then((client) => {
start(client);
})
.catch((erro) => {
console.log(erro);
});
Gets the return if the session is isLogged or notLogged or browserClose or qrReadSuccess or qrReadFail or autocloseCalled or desconnectedMobile or deleteToken or chatsAvailable or deviceNotConnected or serverWssNotConnected or noOpenBrowser or initBrowser or openBrowser or connectBrowserWs or initWhatsapp or erroPageWhatsapp or successPageWhatsapp or waitForLogin or waitChat or successChat or Create session wss return "serverClose" case server for close
| Status | Condition |
|---|---|
isLogged |
When the user is already logged in to the browser |
notLogged |
When the user is not connected to the browser, it is necessary to scan the QR code through the cell phone in the option WhatsApp Web |
browserClose |
If the browser is closed this parameter is returned |
qrReadSuccess |
If the user is not logged in, the QR code is passed on the terminal a callback is returned. After the correct reading by cell phone this parameter is returned |
qrReadFail |
If the browser stops when the QR code scan is in progress, this parameter is returned |
autocloseCalled |
The browser was closed using the autoClose command |
desconnectedMobile |
Client has desconnected in to mobile |
serverClose |
Client has desconnected in to wss |
deleteToken |
If you pass true within the function |
chatsAvailable |
When Venom is connected to the chat list |
deviceNotConnected |
Chat not available because the phone is disconnected (Trying to connect to the phone) |
serverWssNotConnected |
The address wss was not found! |
$ claude mcp add venom \
-- python -m otcore.mcp_server <graph>