npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@otax/bails

v1.0.0

Published

WhatsApp API Baileys OTAX

Readme

⸙ 𝙊𝙏𝘼𝙓 — 𝙒𝙃𝘼𝙏𝙎𝘼𝙋𝙋 𝘼𝙋𝙄 (OTAXBAILS)

⸙ Deskripsi

OTAXBAILS adalah engine WhatsApp API bergaya OTAX berbasis Baileys yang dioptimalkan untuk performa, stabilitas, dan keamanan tingkat produksi. Siap dipakai pada ekosistem OTAX (Telegram Bot, Panel, dan Gateway), mendukung multi-device, auto-reconnect, dan integrasi kontrol penuh.


⸙ Fitur Utama

⚙️ WebSocket native, multi-device, tanpa Selenium/Chromium

🔁 Auto reconnect, recovery state, sinkronisasi riwayat opsional

🧠 Integrasi ekosistem OTAX: Token, SenderLock, SessionPool, RateLimiter

🧩 Modular command: /deploy, /notif, /autonotif, /stopnotif, /track, /encjava, /aksesadp, /BugGroup

💬 Event lengkap: messages.upsert, groups.update, presence.update, connection.update

🔒 Hardening: anti-crash, anti-tamper, opsi ephemeral, mark-online control

📦 Store opsional (in-memory/FS/DB) + util unduh/unggah ulang media

Gunakan secara bertanggung jawab. Patuhi kebijakan platform dan hukum yang berlaku.


⸙ Instalasi

GitHub (disarankan untuk repo privat OTAX):

yarn add github:OTAX-Bot/OTAXBAILS

atau

yarn add https://github.com/OTAX-Bot/OTAXBAILS.git

Monorepo/Local path:

yarn add file:./packages/OTAXBAILS


⸙ Konfigurasi Yang Perlu Diganti

Buat .env atau environment variable sesuai panel/hosting kamu:

GITHUB_TOKEN=ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXX OTAX_OWNER_ID=0000000000 OTAX_TELEGRAM_BOT_TOKEN=000:AAA OTAX_PANEL_HOST=https://panel-kamu.tld OTAX_SESSION_DIR=./data/auth/otax OTAX_LOG_DIR=./logs OTAX_SENDER_NUMBER=6285XXXXXXXX

Struktur repo yang direkomendasikan:

. ├─ src/ │ ├─ index.ts │ ├─ otax.config.ts │ └─ plugins/ ├─ data/ │ └─ auth/ ├─ logs/ ├─ package.json └─ tsconfig.json


⸙ Quickstart (Gaya OTAX)

TypeScript:

import makeWASocket, { DisconnectReason, useMultiFileAuthState, Browsers } from "@whiskeysockets/baileys" import pino from "pino"

async function main() { const { state, saveCreds } = await useMultiFileAuthState(process.env.OTAX_SESSION_DIR || "./data/auth/otax") const sock = makeWASocket({ auth: state, browser: Browsers.macOS("OTAX-Desktop"), printQRInTerminal: true, markOnlineOnConnect: false, logger: pino({ level: "silent" }) })

sock.ev.on("creds.update", saveCreds)

sock.ev.on("connection.update", ({ connection, lastDisconnect }) => { if (connection === "close") { const code = (lastDisconnect?.error as any)?.output?.statusCode if (code !== DisconnectReason.loggedOut) main() } })

sock.ev.on("messages.upsert", async ({ messages }) => { for (const m of messages) { const body = m.message?.conversation || m.message?.extendedTextMessage?.text || "" if (/^/ping$/i.test(body)) await sock.sendMessage(m.key.remoteJid!, { text: "⸙ OTAX — pong" }) } }) }

main()

Node.js (CommonJS):

const { default: makeWASocket, useMultiFileAuthState, Browsers, DisconnectReason } = require("@whiskeysockets/baileys") const pino = require("pino")

async function main() { const { state, saveCreds } = await useMultiFileAuthState(process.env.OTAX_SESSION_DIR || "./data/auth/otax") const sock = makeWASocket({ auth: state, browser: Browsers.macOS("OTAX-Desktop"), printQRInTerminal: true, markOnlineOnConnect: false, logger: pino({ level: "silent" }) }) sock.ev.on("creds.update", saveCreds) sock.ev.on("connection.update", ({ connection, lastDisconnect }) => { if (connection === "close") { const code = (lastDisconnect?.error || {}).output?.statusCode if (code !== DisconnectReason.loggedOut) main() } }) sock.ev.on("messages.upsert", async ({ messages }) => { for (const m of messages) { const t = (m.message?.conversation || m.message?.extendedTextMessage?.text || "").trim() if (/^/ping$/i.test(t)) await sock.sendMessage(m.key.remoteJid, { text: "⸙ OTAX — pong" }) } }) }

main()


⸙ Pairing Code (Tanpa QR)

import makeWASocket from "@whiskeysockets/baileys"

async function pair() { const sock = makeWASocket({ printQRInTerminal: false }) if (!sock.authState.creds.registered) { const number = process.env.OTAX_SENDER_NUMBER || "6285XXXXXXXX" const code = await sock.requestPairingCode(number) console.log("Pairing Code:", code) } }

pair()


⸙ Rekomendasi Opsi Socket

markOnlineOnConnect: false untuk tetap menerima notifikasi di HP

syncFullHistory: true bila perlu riwayat lengkap (desktop emulation)

browser: Browsers.macOS("OTAX-Desktop") untuk scope history lebih luas

getMessage terhubung ke store untuk retry & decrypt poll votes


⸙ Store & Media Utility

import { makeInMemoryStore, downloadMediaMessage, getContentType } from "@whiskeysockets/baileys" import { createWriteStream } from "fs"

const store = makeInMemoryStore({})

async function onImage(sock: any, m: any) { const t = getContentType(m.message) if (t === "imageMessage") { const stream = await downloadMediaMessage(m, "stream", {}, { reuploadRequest: sock.updateMediaMessage }) stream.pipe(createWriteStream("./download.jpeg")) } }


⸙ Integrasi Command OTAX

Contoh pola handler untuk Telegram/Panel yang memanggil fungsi WA:

export async function cmdNotifEnable(chatId: string, ownerId: string) { return { ok: true, message: "⸙ OTAX — Notifikasi aktif" } }

export async function cmdTrackLink(userId: string) { return { label: "⸙ OTAX — TRACK", url: ${process.env.OTAX_PANEL_HOST}/track?u=${encodeURIComponent(userId)} } }


⸙ Praktik Keamanan

Simpan kredensial di luar repo (env/secret manager)

Hindari hardcode token atau nomor

Batasi akses per-peran (Owner/Admin/Staff/Reseller)

Terapkan rate limit pada endpoint webhook/panel


⸙ Lisensi & Atribusi

Berbasis pada proyek komunitas Baileys. Distribusi mengikuti lisensi MIT dari upstream. Gunakan secara etis dan sesuai ToS platform.


⸙ Dukungan

WhatsApp Owner: wa.me/6281945938917

Telegram Team: t.me/Otapengenkawin