WhatsApp Bot Using Baileys Library By CxD9-Team!
- HEROKU APP
Heroku Deploy Beta
First deploy bot, Click the deploy icon below !
Then click view web. After that, scan the qr, Done.
- RDP/VPS USER
First download tools, Click icon to download !
Make sure everything is in good condition
First, install
• pkg install git
• pkg install ffmpeg
• pkg install nodejs
For all questions in installation just select y
If everything has been confirmed to be safe and installed, continue with the clone repo
• git clone https://github.com/CxD9-Teams/cxd9-bot
• cd cxd9-bot
• npm i
• npm start
For all questions in the installation just select y the second step is to just change the number of the owner of the bot and finally scan the qr code
Powered By
ㅤㅤ | ㅤㅤ |
Example
Send message
let Baileys = require('@adiwajshing/baileys')
// Get message type from Baileys
let { text } = Baileys.MessageType
// Send text
CXD.sendText(from, "Hello World!")
// Send text with reply
CXD.reply(from, "Hello World!")
Send image
let Baileys = require('@adiwajshing/baileys')
let fs = require('fs')
// Get type from Baileys
let {
text,
image
} = Baileys.MessageType
let locationImg = fs.readFileSync('./lib/emror.jpeg')
// Send image
CXD.sendImage(from, locationImg, "This is caption.", false)
// False means without reply
// Send image with reply
CXD.sendImage(from, locationImg, "This is caption.", true)
// True means with reply
// Send image in website
let website = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQKTvqbVbQdjSx7J6IvfQpk-8iNopG_Ox7UCg&usqp=CAU"
CXD.sendImage(from, website, "This is caption.", false)
Send file from folder
let Baileys = require('@adiwajshing/baileys')
// Get message type from Baileys
let {
text,
image,
document,
audio,
video
} = Baileys.MessageType
// Location file
let locationFile = './views/favicon.png'
// Send file with reply
CXD.sendFile(from, locationFile, 'this is caption', true)
/**
* If you wan't without reply, change the true to false.
*/