diff --git a/.eslintrc.js b/.eslintrc.js index beafd5af..995ab585 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -19,7 +19,6 @@ module.exports = { 'no-invalid-this': 'warn', 'no-useless-catch': 'warn', 'require-await': 'error', - 'quotes': ['warn', 'single'], - 'no-async-promise-executor': 'off' + 'quotes': ['warn', 'single'] } } diff --git a/LICENSE b/LICENSE index 08bafdc1..c0a8aca2 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Heikal Syah Shiddiq +Copyright (c) SlavyanDesu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 60dd25e8..aaa85182 100644 --- a/README.md +++ b/README.md @@ -19,15 +19,11 @@

- - -
- - - + +
- +

@@ -43,23 +39,12 @@ * [Node.js](https://nodejs.org/en/) * [Git](https://git-scm.com/downloads) * [FFmpeg](https://www.gyan.dev/ffmpeg/builds/) -* [Tesseract](https://s.id/vftesseract) -* Any text editor - -# Requirements Heroku -* [Chrome](https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-chromedriver) -* [FFmpeg](https://elements.heroku.com/buildpacks/jonathanong/heroku-buildpack-ffmpeg-latest) -* [Tesseract](https://elements.heroku.com/buildpacks/matteotiziano/heroku-buildpack-tesseract) -* [Canvas](https://elements.heroku.com/buildpacks/automattic/node-canvas) - -> Heroku hosting is not recommended for public group. -> # Installation -## ๐Ÿ“ Cloning this repo -```cmd -> git clone https://github.com/SlavyanDesu/BocchiBot.git -> cd BocchiBot +## ๐Ÿ“ Cloning the repo +```bash +$ git clone https://github.com/SlavyanDesu/BocchiBot.git +$ cd BocchiBot ``` ## โœ๏ธ Editing the file @@ -67,54 +52,18 @@ Edit the required value in `config.json`. ```json { "ownerBot": "62812xxxxxxxx@c.us", - "prefix": "$", - "uaOverride": "WhatsApp/2.2037.6 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36", - "nao": "api-key", - "vhtear": "api-key", - "melodic": "administrator", - "tobz": "BotWeA", - "lol": "api-key", + "prefix": ".", + "nao": "SAUCENAO-API-KEY", "authorStick": "@SlavyanDesu", "packStick": "BocchiBot" } ``` `ownerBot`: your WhatsApp number. -`prefix`: based on the latest update, you don't need to change the prefix, because this bot has multiple prefix. -`uaOverride`: your user agent. -`nao`: SauceNAO API key. You can get it [here](https://saucenao.com/user.php) by creating an account. -`vhtear`: VHTear API key. You can get it [here](https://api.vhtear.com/) by purchasing his API key. -`melodic`: MelodicXT API key. You can use `administrator` key. -`tobz`: Tobz API key. You can use `BotWeA` key. -`lol`: LolHuman API key. You can get it [here](https://lolhuman.herokuapp.com/) by creating an account. -`authorStick`: name of the author sticker pack. -`packStick`: name of the sticker pack. - -## ๐Ÿ—ฃ๏ธ Changing language -If you want to change the language to English, replace all `ind` function to `eng`. -Example: -```js -ind.wrongFormat() -``` -To: -```js -eng.wrongFormat() -``` - -## ๐Ÿงพ Installing the Tesseract -* Download the file [here](https://s.id/vftesseract). -* After that, run downloaded file as Administrator. -* Complete the installation. -* Run Command Prompt as Administrator. -* Run this command: -```cmd -> setx /m PATH "C:\Program Files\Tesseract-OCR;%PATH%" -``` -It will give us a callback like `SUCCESS: specified value was saved`. -* Now that you've Tesseract installed, verify that it's working by running this command to see version number: -```cmd -> tesseract -version -``` +`prefix`: bot's prefix. +`nao`: SauceNAO API key. You can get it [here](https://saucenao.com/user.php) by creating an account. +`authorStick`: name of the author sticker pack. +`packStick`: name of the sticker pack. ## ๐Ÿ› ๏ธ Installing the FFmpeg * Download one of the available versions of FFmpeg by clicking [this link](https://www.gyan.dev/ffmpeg/builds/). @@ -122,226 +71,36 @@ It will give us a callback like `SUCCESS: specified value was saved`. * Rename the extracted folder to `ffmpeg`. * Run Command Prompt as Administrator. * Run this command: -```cmd -> setx /m PATH "C:\ffmpeg\bin;%PATH%" +```bash +$ setx /m PATH "C:\ffmpeg\bin;%PATH%" ``` It will give us a callback like `SUCCESS: specified value was saved`. * Now that you've FFmpeg installed, verify that it's working by running this command to see version number: -```cmd -> ffmpeg -version +```bash +$ ffmpeg -version ``` ## ๐Ÿ” Installing the dependencies -```cmd -> npm install +```bash +$ npm install ``` ## ๐Ÿ†— Running the bot Regular node: -```cmd -> npm start +```bash +$ npm start ``` PM2: -```cmd -> pm2 start index.js -> pm2 monit -``` - -PM2 with cron job (restart after 5 hours): -```cmd -> pm2 start index.js --cron "* */5 * * *" -> pm2 monit +```bash +$ pm2 start index.js cluster max +$ pm2 monit ``` -After that scan the QR code using your WhatsApp in your phone! - -# Known issue -## ESM error -To prevent this, please use `node-fetch` and `parse-ms` with v2.x version. -```cmd -> npm install node-fetch@2.6.5 -> npm install parse-ms@2.1.0 -``` +After that scan the QR code using your WhatsApp in your phone. # Features -If you want to unlock premium commands, please buy me a coffee at least 1 on Ko-fi platform. - -| Deploy | Availability | -| :--------------: | :------------: | -| Heroku | โœ”๏ธ | -| Local | โœ”๏ธ | - -| Leveling | Availability | -| :--------------: | :------------: | -| Leveling | โœ”๏ธ | - -| Sticker Maker | Availability | -| :-------------------: | :----------: | -| Send/reply image | โœ”๏ธ | -| Send/reply GIF | โœ”๏ธ | -| Send/reply MP4 | โœ”๏ธ | -| Text to sticker | โœ”๏ธ | -| Text to sticker GIF | โœ”๏ธ | -| Sticker to image | โœ”๏ธ | -| Sticker WM | โœ”๏ธ | -| Take sticker | โœ”๏ธ | - -| Downloader | Availability | -| :-----------------: | :----------: | -| Facebook video | โœ”๏ธ | -| YouTube audio/video | โœ”๏ธ | -| Joox musics | โœ”๏ธ | -| TikTok video | โœ”๏ธ | -| TikTok profile pic | โœ”๏ธ | -| Twitter video/image | โœ”๏ธ | -| Instagram post | โœ”๏ธ | -| Instagram story | โœ”๏ธ | -| LK21 | โœ”๏ธ | -| TikTok no WM | โœ”๏ธ | - -| Misc | Availability | -| :------------------: | :----------: | -| OCR (Image to Text) | โœ”๏ธ | -| Say | โœ”๏ธ | -| Search lyrics | โœ”๏ธ | -| Shortlink maker | โœ”๏ธ | -| Wikipedia (EN) | โœ”๏ธ | -| Wikipedia (ID) | โœ”๏ธ | -| KBBI scarper | โœ”๏ธ | -| Stalk IG account | โœ”๏ธ | -| GSMArena scraper | โœ”๏ธ | -| Search food receipts | โœ”๏ธ | -| YouTube search | โœ”๏ธ | -| Text to speech | โœ”๏ธ | -| AFK | โœ”๏ธ | -| Distance calculator | โœ”๏ธ | -| Sticker search | โœ”๏ธ | -| Calculator | โœ”๏ธ | -| Al-Qur'an surah | โœ”๏ธ | -| List surah | โœ”๏ธ | -| Random contact | โœ”๏ธ | -| YouTube play | โœ”๏ธ | -| Whois | โœ”๏ธ | -| SMS gateway | โœ”๏ธ | -| Al-Qur'an tafseer | โœ”๏ธ | -| Al-Kitab search | โœ”๏ธ | -| LK21 scraper | โœ”๏ธ | -| Reminder | โœ”๏ธ | -| Image uploader | โœ”๏ธ | -| Sholat schedule | โœ”๏ธ | -| Latest Line stickers | โœ”๏ธ | -| Check postage | โœ”๏ธ | -| Sending email | โœ”๏ธ | -| Random quotes | โœ”๏ธ | -| Genshin chara info | โœ”๏ธ | -| Bass boost | โœ”๏ธ | - -| Fun | Availability | -| :-------------------: | :----------: | -| Weton jodoh | โœ”๏ธ | -| Horoscope | โœ”๏ธ | -| Harta tahta maker | โœ”๏ธ | -| Writing text maker | โœ”๏ธ | -| Glitch text maker | โœ”๏ธ | -| SimSimi chatbot | โœ”๏ธ | -| Blackpink logo maker | โœ”๏ธ | -| Pornhub logo maker | โœ”๏ธ | -| Galaxy text maker | โœ”๏ธ | -| Truth or dare | โœ”๏ธ | -| Asupan TikTok | โœ”๏ธ | -| PH comment maker | โœ”๏ธ | -| Triggered maker | โœ”๏ธ | -| Kiss image maker | โœ”๏ธ | -| 3D text maker | โœ”๏ธ | -| Freefire logo maker | โœ”๏ธ | -| Freefire banner maker | โœ”๏ธ | -| Sliding text maker | โœ”๏ธ | -| Hero ML maker | โœ”๏ธ | -| Fire text maker | โœ”๏ธ | -| Couple balloon maker | โœ”๏ธ | -| Wasted maker | โœ”๏ธ | -| Cakl Lontong quiz | โœ”๏ธ | -| Hilih-ify text | โœ”๏ธ | -| Tebak gambar quiz | โœ”๏ธ | -| Random doge stickers | โœ”๏ธ | -| Dice | โœ”๏ธ | - -| Weeb Zone | Availability | -| :-------------------: | :----------: | -| Random neko girl | โœ”๏ธ | -| Random wallpaper | โœ”๏ธ | -| Random kemonomimi | โœ”๏ธ | -| Kusonime scraper | โœ”๏ธ | -| Komiku scraper | โœ”๏ธ | -| Random Video Loli | โœ”๏ธ | -| Anime tracer | โœ”๏ธ | -| Source finder | โœ”๏ธ | -| Random waifu pics | โœ”๏ธ | -| Anitoki latest update | โœ”๏ธ | -| Random anime stickers | โœ”๏ธ | -| Neonime latest update | โœ”๏ธ | -| Anoboy on-going list | โœ”๏ธ | -| Search character | โœ”๏ธ | -| Sticker keywords | โœ”๏ธ | - -| Bot | Availability | -| :--------------: | :----------: | -| Server usage | โœ”๏ธ | -| Blocked list | โœ”๏ธ | -| Ping | โœ”๏ธ | -| Delete messages | โœ”๏ธ | -| Bug report | โœ”๏ธ | -| Join group | โœ”๏ธ | -| Check serials | โœ”๏ธ | - -| Owner | Availability | -| :----------------: | :----------: | -| Broadcasting | โœ”๏ธ | -| Clear all messages | โœ”๏ธ | -| Leave all groups | โœ”๏ธ | -| Get snapshot | โœ”๏ธ | -| Ban | โœ”๏ธ | -| Eval | โœ”๏ธ | -| Shutdown | โœ”๏ธ | -| Add premium user | โœ”๏ธ | -| Set bot's info | โœ”๏ธ | -| Mute bot | โœ”๏ธ | -| Block | โœ”๏ธ | -| Unblock | โœ”๏ธ | - -| Moderation | Availability | -| :--------------: | :----------: | -| Add | โœ”๏ธ | -| Kick | โœ”๏ธ | -| Promote | โœ”๏ธ | -| Demote | โœ”๏ธ | -| Leave bot | โœ”๏ธ | -| Everyone | โœ”๏ธ | -| Toogle NSFW | โœ”๏ธ | -| Set group icon | โœ”๏ธ | -| Anti-group link | โœ”๏ธ | -| Toogle welcome | โœ”๏ธ | -| Auto-sticker | โœ”๏ธ | -| Mute group | โœ”๏ธ | -| Anti-NSFW link | โœ”๏ธ | -| Anti-porn | Premium | - -| NSFW | Availability | -| :----------------: | :----------: | -| Lewds | โœ”๏ธ | -| nHentai lookup | โœ”๏ธ | -| Fetish | โœ”๏ธ | -| Latest Nekopoi | โœ”๏ธ | -| Pornhub downloader | โœ”๏ธ | -| Waifu 18+ | โœ”๏ธ | -| Yuri | โœ”๏ธ | -| Femdom | โœ”๏ธ | -| Lewd avatars | โœ”๏ธ | -| nHentai search | โœ”๏ธ | -| nHentai downloader | Premium/Free | -| Multi-lewds | Premium | -| Multi-fetish | Premium | +Type `.help` to your bot number to see the list of commands. # Thanks to * [`open-wa/wa-automate-nodejs`](https://github.com/open-wa/wa-automate-nodejs)