https://github.com/rizxyu/rain-botv2
Whatsapp bot with ESM
https://github.com/rizxyu/rain-botv2
bot termux
Last synced: about 1 month ago
JSON representation
Whatsapp bot with ESM
- Host: GitHub
- URL: https://github.com/rizxyu/rain-botv2
- Owner: rizxyu
- License: gpl-3.0
- Created: 2022-05-24T08:32:31.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-16T00:18:16.000Z (over 2 years ago)
- Last Synced: 2025-03-24T04:42:35.526Z (about 2 months ago)
- Topics: bot, termux
- Language: JavaScript
- Homepage:
- Size: 7.08 MB
- Stars: 17
- Watchers: 1
- Forks: 15
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rain-BotV2
![]()
#### Join Group
[](https://chat.whatsapp.com/ITjd9jsIfBAK5byfdb2cxj)#### ONLY RUN RAILWAY
[`railway.app`](https://railway.app/new/github)#### Deploy to Heroku
[](https://heroku.com/deploy?template=https://github.com/BochilGaming/games-wabot)#### ✍️ Editing the file
Edit the required value in [`config.js`](https://github.com/Rizxyu/Rain-BotV2/blob/main/config.js)
#### Heroku Buildpack
| BuildPack | LINK |
|--------|--------|
| **FFMPEG** |[here](https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest) |
| **IMAGEMAGICK** | [here](https://github.com/DuckyTeam/heroku-buildpack-imagemagick) |
---------#### Note
```sh
not for termux
```### FOR TERMUX USER
1. Type mentioned below given commands one by one in Termux.
```sh
$ pkg upgrade && pkg update
$ pkg install git -y
$ pkg install nodejs -y
$ pkg install ffmpeg -y
$ pkg install imagemagick -y
$ git clone https://github.com/Rizxyu/Rain-BotV2
$ cd Rain-BotV2
$ npm i
``````sh
$ node .
```
2. Wait for bot starting...
3. Scan QR code from 2nd device. (Go to whatsapp > Linked Devices > Join `Multi Device Beta` > Click on `link device`)
4. Now your bot is ready to rock n roll.#### If npm install failed, try using yarn instead of npm
```sh
$ pkg install yarn -y
$ yarn install
```
---------
## INSTALL ON TERMUX WITH UBUNTU[ INSTALLING UBUNTU ]
```bash
apt update && apt full-upgrade
apt install wget curl git proot-distro
proot-distro install ubuntu
echo "proot-distro login ubuntu" > $PREFIX/bin/ubuntu
chmod +x $PREFIX/bin/ubuntu
ubuntu
```
---------[ INSTALLING REQUIRED PACKAGES ]
```bash
ubuntu
apt update && apt full-upgrade
apt install wget curl git ffmpeg imagemagick build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev dbus-x11 ffmpeg2theora ffmpegfs ffmpegthumbnailer ffmpegthumbnailer-dbg ffmpegthumbs libavcodec-dev libavcodec-extra libavcodec-extra58 libavdevice-dev libavdevice58 libavfilter-dev libavfilter-extra libavfilter-extra7 libavformat-dev libavformat58 libavifile-0.7-bin libavifile-0.7-common libavifile-0.7c2 libavresample-dev libavresample4 libavutil-dev libavutil56 libpostproc-dev libpostproc55 graphicsmagick graphicsmagick-dbg graphicsmagick-imagemagick-compat graphicsmagick-libmagick-dev-compat groff imagemagick-6.q16hdri imagemagick-common libchart-gnuplot-perl libgraphics-magick-perl libgraphicsmagick++-q16-12 libgraphicsmagick++1-dev
```---------
[ INSTALLING NODEJS & Rain-BotV2 ]
```bash
ubuntu
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
apt install -y nodejs gcc g++ make
git clone https://github.com/Rizxyu/Rain-BotV2
cd Rain-BotV2
npm install
npm update
```---------
## FOR WINDOWS/VPS/RDP USER
* Download And Install Git [`Click Here`](https://git-scm.com/downloads)
* Download And Install NodeJS [`Click Here`](https://nodejs.org/en/download)
* Download And Install FFmpeg [`Click Here`](https://ffmpeg.org/download.html) (**Don't Forget Add FFmpeg to PATH enviroment variables**)
* Download And Install ImageMagick [`Click Here`](https://imagemagick.org/script/download.php)```bash
git clone https://github.com/Rizxyu/Rain-BotV2
cd Rain-BotV2
npm install
npm update
```---------
## Run
```bash
node .
```---------
## Arguments `node . [--options] []`
### `--self`
Activate self mode (Ignores other)
### `--pconly`
If that chat not from private bot, bot will ignore
### `--gconly`
If that chat not from group, bot will ignore
### `--swonly`
If that chat not from status, bot will ignore
### `--prefix `
* `prefixes` are seperated by each character
Set prefix### `--server`
Used for [heroku](https://heroku.com/) or scan through website
### `--restrict`
Enables restricted plugins (which can lead your number to be **banned** if used too often)
* Group Administration `add, kick`
### `--img`
Enable image inspector through terminal
### `--autoread`
If enabled, all incoming messages will be marked as read
### `--autocleartmp`
If enabled, **tmp* folder contain files will be auto delete
### `--nyimak`
No bot, just print received messages and add users to database
### `--test`
**Development** Testing Mode
---------
## How To Customise Message Display
```js
// Syntax
conn.sendButton(
jid, // jid of the user to send the message to
text, // text to send
foooter, // footer to send
buffer, // buffer to send (optional), if you want to send button image, location, etc
buttons, // buttons to send, example [['text1', 'id1'], ['text2', 'id2']]
quoted, // quoted message to send (optional)
options // options to send, example { asLocation: true }
)// example
conn.sendButton(m.chat, 'Hello world!', '@BochilGaming', null, [
['Hello', 'hello'], ['Bye', 'bye']
])
// example button location
conn.sendButton(m.chat, 'Hello world!', '@BochilGaming', 'https://github.com/BochilGaming',
[['Hello', 'hello'], ['Bye', 'bye']],
null, { asLocation: true }
)
```
---------### want to contribute?
1. fork this repository
2. Change/edit/create what you want. for example you can add features, fix bug, etc
3. **test** before making a pull req!!
4. make a pull req!
5. if your pull req is already in **acc/merge**, you can delete your branch or you can create pull req again :)---------
### Thanks To
**Allah SWT**,**Orang Tua**,
**Semua yang selalu mendukung**
#### Special Thanks to
[](https://github.com/Nurutomo)
[](https://github.com/BochilGaming)
[](https://github.com/Rizxyu)
[](https://github.com/ibrahKrep)
[](https://github.com/MuhammadRestu999)