neoxr / neoxr-bot

Baileys WhatsApp Bot
https://api.neoxr.my.id
158 stars 322 forks source link
web-socket whatsapp-bot

NEOXR-BOT (BETA TEST)

An implementation of @neoxr/wb which has been optimized to be lightweigth.

Important

To use @neoxr/wb >= v1.17.20 you must add the following components Open Commit

Script Delay 🤣

Buat yang lapor ke kreator scriptnya delay itu bukan delay melainkan sistem anti spam (cooldown) supaya nomor tahan banned, jika di rasa sistem ini tidak berguna dan nomormu kebal dari banned matikan anti spam : *.antispam off

Premium Script v4.1

🏷️ Price : Rp. 150.000 / $20.80

Special Features & Benefit :

Additional Features :

Addional Features adalah fitur tambahan yang di jual terpisah / Additional features are features that are sold separately.

🏷️ Cloud Storage (+Rp. 35.000 / +$6.80)

Cloud Storage ini berfungsi untuk menyimpan file media (sticker, foto, video, audio) ke cloud storage tanpa membebani disk space server karena file langsung di simpan kedalam database. Plugin storage.js dan storage_ev.js

🏷️ Menfess (+Rp. 15.000 / +$3.80)

Menfess untuk mengirim chat confess kepada seseorang dan penerima pesan bisa membalas chat dari pengirim confess tanpa perlu menggunakan command/perintah

🏷️ Payment Gateway (+Rp. 80.000 / +$10.80)

Payment Gateway ini berfungsi untuk melakukan pembayaran otomatis menggunakan QRIS pada fitur ini terdapat script payment gateway, plugin payment.js, sewa.js dan buyprem.js harga dan fee bisa di sesuaikan sesuai keinginan, dalam pembelian mendapat 2 script payment gateway yaitu dari saweria dan paydisini yang mendukung all payment

🏷️ Game Plugins (+Rp. 70.000 / +$9.80)

24 plugin game yang semuanya tanpa menggunakan api dan tanpa di enskripsi, dengan ini ada tambahan update schema, profile, rank, pocket, dll.

Creator / Group : Wildan Izzudin / Chatbot

Requirements

Recommended Server

Configuration

There are 2 configuration files namely .env and config.json, adjust them before installing.

{
   "owner": "6285887776722",
   "owner_name": "Wildan Izzudin",
   "database": "data",
   "limit": 15,
   "ram_limit": "900mb",
   "max_upload": 50,
   "max_upload_free": 10,
   "cooldown": 3, // anti spam hold 3 seconds
   "timer": 180000,
   "timeout": 1800000,
   "permanent_threshold": 3,
   "notify_threshold": 4,
   "banned_threshold": 5,
   "blocks": ["994", "91", "92"],
   "evaluate_chars":  ["=>", "~>", "<", ">", "$"],
   "pairing": {
      "state": true, // "true" if you want to use the pairing code
      "number": 62xxxx // start number with country code
   }
}
### Neoxr API : https://api.neoxr.my.id
API_KEY = 'your_apikey'

### Database : https://www.mongodb.com/
DATABASE_URL = ''

### Timezone (Important)
TZ = 'Asia/Jakarta'

Notes :

Localdb is only for development state, for production state you must use a cloud database (mongo / postgres)

High Level Spam Detection

This program is equipped with a spam detector (anti-spam) which is very sensitive.

const { Spam } = new(require('@neoxr/wb))

const spam = new Spam({
   RESET_TIMER: env.cooldown,
   HOLD_TIMER: env.timeout,
   PERMANENT_THRESHOLD: env.permanent_threshold,
   NOTIFY_THRESHOLD: env.notify_threshold,
   BANNED_THRESHOLD: env.banned_threshold
})

const isSpam = spam.detection(client, m, {
   prefix, command, commands, users, cooldown,
   show: 'all', // for logger in the terminal, choose 'all' or 'command-only'
   banned_times: users.ban_times
})

console.log(isSpam.state)

Look, i tries to spam commands against the bot, and will only respond to 1 command.

and the message gets a red label [ SPM ] as spam message in the terminal.

Run on Heroku

To run this bot on Heroku you only need to add 2 buildpacks and choose region EU (EUROPE) for your app :

delete the package.json, and rename package-for-heroku.json to package.json

Run on Clovyr

Clovyr is a free cloud compute with vscode based for running bot with specifications of 2 CPU and 4GB RAM (idk storage size)

with vscode it will be very easy to do recode and debugging scripts

Notes :

Specifically for the 2 configurations below, you must carry out an inspect element using a computer to get cookies and keep-alive links

Pairing Code

Connecting account without qr scan but using pairing code.

{
   "pairing": {
      "state": true, // "true" if you want to use the pairing code
      "number": 62xxxx // start number with country code
   }
}

Installation & Run

Make sure the configuration and server meet the requirements so that there are no problems during installation or when this bot is running, type this on your console :

$ npm -i g yarn
$ yarn install --ignore-engines
$ node .

or want to use pm2

$ npm -i g pm2 yarn
$ yarn install --ignore-engines
$ pm2 start index.js && pm2 save && pm2 logs

Command Plugin

Command Plugin is a plugin that will run using the command.

exports.run = {
   usage: ['mediafire'],
   hidden: ['mf'],
   use: 'link',
   category: 'downloader',
   async: async (m, {
      client,
      args,
      text,
      isPrefix,
      command,
      env,
      Scraper,
      Func
   }) => {
      try {
         // do something
      } catch (e) {
         console.log(e)
         client.reply(m.chat, Func.jsonFormat(e), m)
      }
   },
   error: false,
   limit: true,
   restrict: true,
   cache: true,
   location: __filename
}

Up Side Options :

Down Side Options

Other :

cmd.async(m, { client, args, text, isPrefix: prefix, prefixes, command, groupMetadata, participants, users, chats, groupSet, setting, isOwner, isAdmin, isBotAdmin, plugins, blockList, env, ctx, Func, Scraper })

Event Plugin

Event Plugin is a plugin that runs automatically without using the command.

exports.run = {
   async: async (m, {
      client,
      body,
      prefixes
   }) => {
      try {
         // do something
      } catch (e) {
         return client.reply(m.chat, Func.jsonFormat(e), m)
      }
   },
   error: false,
   cache: true,
   location: __filename
}

Other :

event.async(m, { client, body, prefixes, groupMetadata, participants, users, chats, groupSet, setting, isOwner, isAdmin, isBotAdmin, plugins, blockList, env, ctx, Func, Scraper })

Others please learn by yourself from other plugins.

Check this repository regularly to get updates because the progress base is not 100% yet (this is just a base or beta test), if you find an error please make an issue. Thanks.