Hello everybody, how are you all, I hope you're good. So I just make this my program first. I have been understand all for use it and you can use it well for whatsapp bot users
Don't change it if you do not understand this code, you can following in below for you, except it developer.
settings your whatsapp bots in file ./settings.js
- true = (active/right)
- false = (nonactive)
- ownerNumber = (Enter your phone number Owner)
- ownerName = (Enter your owner name)
- author = (Enter your author)
- website = (Enter your website)
- BotName = (bot name)
- BotImage = (Bot profile images)
- not_ppuser = (if the use doen't use the profile picture)
- language = (you can set avaiable on 'id', and 'en'. for default 'all')
- qrcode_donate = (you can use picture for donate)
- autoReadChat = (Read messages)
- setBotProfileSelf = (set bot profile itself on whatsapp)
- autoTyping = (Typing messages)
- replyWithThumbnail = (reply message with thumbnail it like link)
- usereplyMessage = (for use reply message users with thumbnail)
- multi = (multiprefix without change prefix)
- prefix = (you can set/use prefix manually)
- messageHandler = (for message response)
// Selfbot whatsapp
global.selfbot = false
// Set Bot image whatsapp profile itself...
global.setBotProfileSelf = false
// Typing message after message response...
global.autoTyping = true
// Chat read after message response...
global.autoReadChat = true
// Last seen message...
global.LastSeenMessage = false
// Multi prefix...
global.multi = false // if you want to use a multi prefix, you can change here to "true"
// Reply message with thumbnail. (if you want to use You can change to "true")
global.replyWithThumbnail = false // (for replace to message thumbnail)
global.usereplyMessage = true // (for use reply message users with thumbnail)
// Set path ffmpeg from "npm i @ffmpeg-installer/ffmpeg".
global.setFfmpegPath = false
// Other
global.ownerNumber = '6285161422971' // Owner Bot, You can change to your phone number without "+" and "-"
global.ownerName = 'Cakra Yudha Pratama' // Owner name
global.BotName = 'CAKRA BOT' // Bot Name
global.prefix = '/' // Set prefix command
global.language = 'en' // You can change this language for all text with "all" --> ['id', 'en', 'all']
global.BotImage = fs.readFileSync('./file/img/CakraBot.png') // You can change this bot images <Buffer>
global.RestApi = 'https://cakrayp.herokuapp.com/'
global.apiCakra = 'https://cakrayp.herokuapp.com'
global.apikeyCakra = 'cakrayp24Q6'
global.website = 'https://cakrajihan.wordpress.com/'
global.qrcode_donate = ''
global.not_ppuser = fs.readFileSync('./file/img/no_ppuser.jpeg') // You can change this image <Buffer>, if it user isn't using profile picture.
global.lib_package = '@adiwajshing/baileys-md (multi-device)' // Package name Type for library name
global.author = 'Cakrayp' // Author name
global.messageHandler = {
error: {
ind: "Mohon maaf fitur ini sedang *Error*, Silahkan dicoba lagi nanti atau dicoba yang lain.",
eng: "Sorry, this feature is in *Error*, please try again later or try another."
},
wait: {
ind: "Mohon ditunggu dalam proses...",
eng: "Waiting for Process..."
},
owner_bot: {
eng: "This Command can be use Only for Owner.",
ind: "Perintah ini hanya dapat digunakan oleh Owner."
},
admingroup: {
eng: "This Command can be use Only for group admins",
ind: "Perintah ini hanya dapat digunakan oleh admin group"
},
admin_owner: {
eng: "This Command can be use Only for owner or group admins",
ind: "Perintah ini hanya dapat digunakan oleh admin group atau owner"
},
Bot_admingroup: {
eng: "This Command can be use when the bot is already a group admin",
ind: "Perintah ini hanya dapat digunakan ketika bot ini sebagai admin"
},
groupOnly: {
eng: "This Command can be use Only in the Group",
ind: "Perintah ini hanya dapat digunakan didalam group"
},
privateChat: {
eng: "This Command can be use Only in private chat",
ind: "Perintah ini hanya dapat digunakan didalam chat (obrolan) pribadi"
},
mainstance: {
ind: 'Mohon maaf, fitur ini sedang mainstance (diperbaikan)',
eng: 'Sorry, this feature is currently under maintenance',
},
numberOnly: {
ind: 'Mohon maaf ini khusus untuk angka.',
eng: 'Sorry this is for numbers only.'
},
soon: "Coming Soon!",
indoOnly: "This command can be use Only for indonesian country."
}
FOR CLI (Command Line)
FOR Manually Installation
- Node
Click here
- ffmpeg
Click here
- Git
Click here
> apt update
Install Git:
> apt install git
Install ffmpeg:
> apt install ffmpeg
Node JS installation:
(for default version)
> apt install nodejs
(Change nodejs version)
You can see this for nvm Examples: "https://github.com/nvm-sh/nvm"
> curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
$ nvm install 16.14.2
$ nvm use 16.14.2
Now using node v16.14.2 (npm v8.5.0)
Note:
If you have a sudo command, you can write the command "sudo apt
<command>
<options>
"
if you do not have curl
command, you can type the command "apt install curl
"
Clone this repository:
> git clone <link github>
> cd <path>
Install the dependencies:
> npm install
Installation for npm package:
You can visit here.
(Install packages)
> npm install <package name>
(Uninstall packages)
> npm uninstall <package name>
Start program:
> npm start
Or
> node index.js
Start program with pm2:
You can see for Examples of pm2 in Here
(Installation pm2)
> npm install pm2 -g
(start program)
> pm2 start index.js
(stop program)
> pm2 stop index.js
(restart program)
> pm2 restart index.js
(monitor logs)
> pm2 monit
if you have a problem, please Contant me Enjoyy...