New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

prastzyy

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons
Malware was recently detected in this package.

Affected versions:

1.0.0

prastzyy

hello I am prastzy, I am a student trying to develop a WhatsApp library via baileys and this is my baileys prastzy

unpublished
npmnpm
Version
1.0.0
Version published
Weekly downloads
223
-8.23%
Maintainers
1
Weekly downloads
 
Created
Source



prastzyy

Lightweight WhatsApp Web Library

Library WhatsApp ringan berbasis Baileys, dikembangkan dan dipelihara oleh @Prasszxd2 dengan fokus pada koneksi WhatsApp Web, message handling, raw message relay, dan berbagai utilitas tambahan.


Node.js Baileys License NPM


prastzyy · WhatsApp Web Library

[!NOTE] prastzyy tidak berafiliasi dengan WhatsApp atau Meta.

Gunakan library ini secara bertanggung jawab dan selalu ikuti Terms of Service WhatsApp.

✦ Features

Connection

  • WhatsApp Web connection
  • QR Code authentication
  • Pairing Code authentication
  • Multi-device authentication
  • Automatic credential persistence
  • Connection event handling

Messaging

  • sendMessage
  • relayMessage
  • Raw message support
  • Custom message structures
  • Text messages
  • Image messages
  • Video messages
  • Message event handling

Relay

  • Raw message relay
  • Custom relay structure
  • SelfMe relay option
  • Direct message object handling

Installation

Install prastzyy menggunakan npm:

npm install prastzyy

Atau gunakan sebagai alias untuk package Baileys:

{
  "dependencies": {
    "@whiskeysockets/baileys": "npm:prastzyy@1.0.0"
  }
}

Dengan metode alias tersebut, source code yang menggunakan:

require("@whiskeysockets/baileys")

tetap dapat digunakan tanpa perlu mengganti seluruh import di project.

Quick Start

const makeWASocket =
  require("@whiskeysockets/baileys").default

const {
  useMultiFileAuthState
} = require("@whiskeysockets/baileys")

async function start() {
  const { state, saveCreds } =
    await useMultiFileAuthState("./session")

  const sock = makeWASocket({
    auth: state
  })

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

  sock.ev.on(
    "connection.update",
    ({ connection }) => {
      console.log("Connection:", connection)
    }
  )
}

start()

Messaging

Text Message

await sock.sendMessage(
  "628xxxxxxxxxx@s.whatsapp.net",
  {
    text: "Hello from prastzyy"
  }
)

Image Message

await sock.sendMessage(
  "628xxxxxxxxxx@s.whatsapp.net",
  {
    image: {
      url: "./image.jpg"
    },
    caption: "Hello from prastzyy"
  }
)

Video Message

await sock.sendMessage(
  "628xxxxxxxxxx@s.whatsapp.net",
  {
    video: {
      url: "./video.mp4"
    },
    caption: "Hello from prastzyy"
  }
)

Raw Message Relay

relayMessage() dapat digunakan untuk mengirim sebuah message object secara langsung.

await sock.relayMessage(
  target,
  message,
  {
    messageId: message.key.id
  }
)

SelfMe

prastzyy menyediakan opsi:

SelfMe: true

Contoh:

await sock.relayMessage(
  target,
  message,
  {
    messageId: message.key.id,
    SelfMe: true
  }
)

Opsi tersebut merupakan bagian dari implementasi/custom behavior pada library ini untuk mengatur bagaimana message relay diproses oleh client.

Relay Examples

Conversation

await sock.relayMessage(
  jid,
  {
    conversation: "Hello"
  },
  {
    SelfMe: true
  }
)

Extended Text

await sock.relayMessage(
  jid,
  {
    extendedTextMessage: {
      text: "Hello"
    }
  },
  {
    SelfMe: true
  }
)

Events

Semua event dapat diakses melalui:

sock.ev

Connection Update

sock.ev.on(
  "connection.update",
  ({ connection }) => {
    console.log(
      "[ CONNECTION ]",
      connection
    )
  }
)

Incoming Messages

sock.ev.on(
  "messages.upsert",
  ({ messages }) => {
    for (const message of messages) {
      console.log(
        "Incoming:",
        message.message
      )
    }
  }
)

Credentials

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

Authentication

prastzyy menggunakan multi-file authentication state untuk menyimpan session WhatsApp.

Contoh struktur session:

session/
├── creds.json
├── app-state-sync-key-*.json
├── app-state-sync-version.json
└── ...

Jangan upload session ke repository.

Tambahkan:

session/
node_modules/
.env

Complete Example

const makeWASocket =
  require("@whiskeysockets/baileys").default

const {
  useMultiFileAuthState
} = require("@whiskeysockets/baileys")

async function start() {
  const { state, saveCreds } =
    await useMultiFileAuthState("./session")

  const sock = makeWASocket({
    auth: state
  })

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

  sock.ev.on(
    "connection.update",
    ({ connection }) => {
      console.log(
        "[ CONNECTION ]",
        connection
      )
    }
  )

  async function sendText(jid, text) {
    return sock.sendMessage(
      jid,
      {
        text
      }
    )
  }

  async function relay(jid, message) {
    return sock.relayMessage(
      jid,
      message,
      {
        messageId: message.key.id,
        SelfMe: true
      }
    )
  }

  await sendText(
    "628xxxxxxxxxx@s.whatsapp.net",
    "Hello from prastzyy!"
  )
}

start()
my-whatsapp-bot/
│
├── session/
│
├── index.js
├── package.json
├── package-lock.json
└── .gitignore

Requirements

RequirementVersion
Node.js>= 20
npmLatest recommended
WhatsAppMulti-device enabled

Disclaimer

prastzyy dibuat untuk kebutuhan development, testing, dan educational purposes.

Developer tidak bertanggung jawab atas:

  • Penyalahgunaan library
  • Account restrictions
  • Account bans
  • Spam atau abuse
  • Pelanggaran Terms of Service WhatsApp
  • Kerusakan atau kehilangan data akibat penggunaan library

Gunakan library ini secara bertanggung jawab.

👤 Credits

@Prasszxd2

Main Developer & Maintainer


Based on:

Baileys


GitHub

📄 License

This project is released under the MIT License.

See LICENSE for more information.



prastzyy

Lightweight WhatsApp Web Library


Built with Baileys · Maintained by @Prasszxd2

Keywords

baileys

FAQs

Package last updated on 28 Sep 2026

Related posts