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

smilebail

v1.2.5

Published

WhatsApp API Baileys Smile

Readme

⸙ 𝙎𝙈𝙄𝙇𝙀 — 𝙒𝙃𝘼𝙏𝙎𝘼𝙋𝙋 𝘼𝙋𝙄 (SMILEBAILS)

⸙ Deskripsi

SMILEBAIL adalah engine WhatsApp API bergaya SMILE berbasis Baileys yang dioptimalkan untuk performa, stabilitas, dan keamanan tingkat produksi. Siap dipakai pada ekosistem SMILE (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 SMILE: 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 Smile):

yarn add github:ZerothCore/Smilebail

atau

yarn add https://github.com/ZerothCore/Smilebail.git

Monorepo/Local path:

yarn add file:./packages/Smilebail


⸙ Konfigurasi Yang Perlu Diganti

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

GITHUB_TOKEN=ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXX SMILE_OWNER_ID=0000000000 SMILE_TELEGRAM_BOT_TOKEN=000:AAA SMILE_PANEL_HOST=https://panel-kamu.tld SMILE_SESSION_DIR=./data/auth/smile SMILE_LOG_DIR=./logs SMILE_SENDER_NUMBER=6285XXXXXXXX

Struktur repo yang direkomendasikan:

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


⸙ Quickstart (Gaya SMILE)

TypeScript:

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

async function main() { const { state, saveCreds } = await useMultiFileAuthState(process.env.SMILE_SESSION_DIR || "./data/auth/smile") const sock = makeWASocket({ auth: state, browser: Browsers.macOS("SMILE-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: "⸙ SMILE — 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.SMILE_SESSION_DIR || "./data/auth/smile") const sock = makeWASocket({ auth: state, browser: Browsers.macOS("SMILE-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: "⸙ SMILE — 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.SMILE_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("SMILE-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 SMILE

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

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

export async function cmdTrackLink(userId: string) { return { label: "⸙ SMILE — TRACK", url: ${process.env.SMILE_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/62881010520506

Telegram Team: t.me/ZerothCore