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)