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

wileys-neji

v2.0.3

Published

Modificación de la API de WhatsApp por Neji

Readme

WhatsApp Baileys

WhatsApp Baileys es una biblioteca de código abierto diseñada para ayudar a los desarrolladores a crear soluciones de automatización e integraciones con WhatsApp de forma eficiente y directa. Utilizando tecnología websocket sin necesidad de un navegador, esta biblioteca admite una amplia gama de funciones, como la gestión de mensajes, la gestión de chats y la administración de grupos, así como mensajes interactivos y botones de acción para una experiencia de usuario más dinámica.

Baileys, desarrollado y mantenido activamente, recibe actualizaciones constantes para mejorar la estabilidad y el rendimiento. Uno de los principales objetivos es mejorar los procesos de emparejamiento y autenticación para que sean más estables y seguros. Las funciones de emparejamiento se pueden personalizar con sus propios códigos, lo que aumenta la fiabilidad del proceso y reduce las interrupciones.

Esta biblioteca es ideal para crear bots empresariales, sistemas de automatización de chat, soluciones de atención al cliente y otras aplicaciones de automatización de la comunicación que requieren alta estabilidad y funcionalidades completas. Gracias a su diseño ligero y modular, baileys se integra fácilmente en diferentes sistemas y plataformas.


Main Features and Advantages

  • Admite procesos de emparejamiento automáticos y personalizados.
  • Corrige problemas de emparejamiento anteriores que a menudo causaban fallas o desconexiones.
  • Admite mensajes interactivos, botones de acción y menús dinámicos.
  • Gestión automática y eficiente de sesiones para un funcionamiento fiable
  • Compatible con las últimas funciones multidispositivo de WhatsApp
  • Ligero, estable y fácil de integrar en varios sistemas.
  • Adecuado para desarrollar bots, automatización y soluciones de comunicación completas.
  • Documentación completa y códigos de ejemplo para facilitar el desarrollo.

Getting Started

Empiece por instalar la biblioteca mediante su gestor de paquetes preferido y siga la guía de configuración proporcionada. También puede utilizar los códigos de ejemplo ya preparados para comprender el funcionamiento de las funciones. Utilice el almacenamiento de sesiones y las funciones de mensajería interactiva para crear soluciones completas y estables adaptadas a las necesidades de su negocio o proyecto.


Agregar función (código simple)

Comprobar canal de identificación

Obtener canal de identificación

espera sock.newsletterId(url) 

Verificar número prohibido

Puedes ver el estado de los números bloqueados aquí

await sock.checkWhatsApp(jid)

Documentación de SendMessage

Mensaje de grupo de estado V2

Enviar estado de grupo con la versión 2

await sock.sendMessage(jid, {
     groupStatusMessage: {
          text: "Hello World"
     }
});

Album Message (Multiple Images)

Enviar varias imágenes en un solo mensaje de álbum:

await sock.sendMessage(jid, { 
    albumMessage: [
        { image: cihuy, caption: "Foto pertama" },
        { image: { url: "URL IMAGE" }, caption: "Foto kedua" }
    ] 
}, { quoted: m });

Event Message

Crea y envía invitaciones a eventos de WhatsApp:

await sock.sendMessage(jid, { 
    eventMessage: { 
        isCanceled: false, 
        name: "Hello World", 
        description: "yume native", 
        location: { 
            degreesLatitude: 0, 
            degreesLongitude: 0, 
            name: "rowrrrr" 
        }, 
        joinLink: "https://call.whatsapp.com/video/yumevtc", 
        startTime: "1763019000", 
        endTime: "1763026200", 
        extraGuestsAllowed: false 
    } 
}, { quoted: m });

Mensaje de resultado de la encuesta

Mostrar los resultados de la encuesta con el recuento de votos:

await sock.sendMessage(jid, { 
    pollResultMessage: { 
        name: "Hello World", 
        pollVotes: [
            {
                optionName: "TEST 1",
                optionVoteCount: "112233"
            },
            {
                optionName: "TEST 2",
                optionVoteCount: "1"
            }
        ] 
    } 
}, { quoted: m });

Mensaje interactivo simple

Envíe mensajes interactivos básicos con la funcionalidad del botón copiar:

await sock.sendMessage(jid, {
    interactiveMessage: {
        header: "Hello World",
        title: "Hello World",
        footer: "telegram: @yumevtc ",
        buttons: [
            {
                name: "cta_copy",
                buttonParamsJson: JSON.stringify({
                    display_text: "copy code",
                    id: "123456789",              
                    copy_code: "ABC123XYZ"
                })
            }
        ]
    }
}, { quoted: m });

Mensaje interactivo con flujo nativo

Envíe mensajes interactivos con botones, acciones de copia y funciones de flujo nativas:

await sock.sendMessage(jid, {    
    interactiveMessage: {      
        header: "Hello World",
        title: "Hello World",      
        footer: "telegram: @yumevtc",      
        image: { url: "https://example.com/image.jpg" },      
        nativeFlowMessage: {        
            messageParamsJson: JSON.stringify({          
                limited_time_offer: {            
                    text: "idk hummmm?",            
                    url: "https://t.me/yumevtc",            
                    copy_code: "yume",            
                    expiration_time: Date.now() * 999          
                },          
                bottom_sheet: {            
                    in_thread_buttons_limit: 2,            
                    divider_indices: [1, 2, 3, 4, 5, 999],            
                    list_title: "yume native",            
                    button_title: "yume native"          
                },          
                tap_target_configuration: {            
                    title: " X ",            
                    description: "bomboclard",            
                    canonical_url: "https://t.me/yumevtc",            
                    domain: "shop.example.com",            
                    button_index: 0          
                }        
            }),        
            buttons: [          
                {            
                    name: "single_select",            
                    buttonParamsJson: JSON.stringify({              
                        has_multiple_buttons: true            
                    })          
                },          
                {            
                    name: "call_permission_request",            
                    buttonParamsJson: JSON.stringify({              
                        has_multiple_buttons: true            
                    })          
                },          
                {            
                    name: "single_select",            
                    buttonParamsJson: JSON.stringify({              
                        title: "Hello World",              
                        sections: [                
                            {                  
                                title: "title",                  
                                highlight_label: "label",                  
                                rows: [                    
                                    {                      
                                        title: "@yumevtc",                      
                                        description: "love you",                      
                                        id: "row_2"                    
                                    }                  
                                ]                
                            }              
                        ],              
                        has_multiple_buttons: true            
                    })          
                },          
                {            
                    name: "cta_copy",            
                    buttonParamsJson: JSON.stringify({              
                        display_text: "copy code",              
                        id: "123456789",              
                        copy_code: "ABC123XYZ"            
                    })          
                }        
            ]      
        }    
    }  
}, { quoted: m });

Mensaje interactivo con miniatura

Envía mensajes interactivos con imagen en miniatura y botón para copiar:

await sock.sendMessage(jid, {
    interactiveMessage: {
        header: "Hello World",
        title: "Hello World",
        footer: "telegram: @yumevtc",
        image: { url: "https://example.com/image.jpg" },
        buttons: [
            {
                name: "cta_copy",
                buttonParamsJson: JSON.stringify({
                    display_text: "copy code",
                    id: "123456789",
                    copy_code: "ABC123XYZ"
                })
            }
        ]
    }
}, { quoted: m });

Mensaje del producto

Envíe mensajes de catálogo de productos con botones e información del comerciante:

await sock.sendMessage(jid, {
    productMessage: {
        title: "Produk Contoh",
        description: "Ini adalah deskripsi produk",
        thumbnail: { url: "https://example.com/image.jpg" },
        productId: "PROD001",
        retailerId: "RETAIL001",
        url: "https://example.com/product",
        body: "Detail produk",
        footer: "Harga spesial",
        priceAmount1000: 50000,
        currencyCode: "USD",
        buttons: [
            {
                name: "cta_url",
                buttonParamsJson: JSON.stringify({
                    display_text: "Beli Sekarang",
                    url: "https://example.com/buy"
                })
            }
        ]
    }
}, { quoted: m });

Mensaje interactivo con búfer de documentos

Enviar mensajes interactivos con documentos desde el buffer (sistema de archivos) - Nota: Los documentos solo admiten buffer:

await sock.sendMessage(jid, {
    interactiveMessage: {
        header: "Hello World",
        title: "Hello World",
        footer: "telegram: @yumevtc",
        document: fs.readFileSync("./package.json"),
        mimetype: "application/pdf",
        fileName: "yumevtc.pdf",
        jpegThumbnail: fs.readFileSync("./document.jpeg"),
        contextInfo: {
            mentionedJid: [jid],
            forwardingScore: 777,
            isForwarded: false
        },
        externalAdReply: {
            title: "shenń Bot",
            body: "anu team",
            mediaType: 3,
            thumbnailUrl: "https://example.com/image.jpg",
            mediaUrl: " X ",
            sourceUrl: "https://t.me/yumevtc",
            showAdAttribution: true,
            renderLargerThumbnail: false         
        },
        buttons: [
            {
                name: "cta_url",
                buttonParamsJson: JSON.stringify({
                    display_text: "Telegram",
                    url: "https://t.me/yumevtc",
                    merchant_url: "https://t.me/yumevtc"
                })
            }
        ]
    }
}, { quoted: m });

Interactive Message with Document Buffer (Simple)Mensaje interactivo con búfer de documentos (simple)

Enviar mensajes interactivos con documentos desde el búfer (sistema de archivos) sin contextInfo ni externalAdReply - Nota: Los documentos solo admiten búfer:

await sock.sendMessage(jid, {
    interactiveMessage: {
        header: "Hello World",
        title: "Hello World",
        footer: "telegram: @yumevtc",
        document: fs.readFileSync("./package.json"),
        mimetype: "application/pdf",
        fileName: "yumevtc.pdf",
        jpegThumbnail: fs.readFileSync("./document.jpeg"),
        buttons: [
            {
                name: "cta_url",
                buttonParamsJson: JSON.stringify({
                    display_text: "Telegram",
                    url: "https://t.me/yumevtc",
                    merchant_url: "https://t.me/yumevtc"
                })
            }
        ]
    }
}, { quoted: m });

Request Payment Message

Envía mensajes de solicitud de pago con fondo y pegatina personalizados:

let quotedType = m.quoted?.mtype || '';
let quotedContent = JSON.stringify({ [quotedType]: m.quoted }, null, 2);

await sock.sendMessage(jid, {
    requestPaymentMessage: {
        currency: "IDR",
        amount: 10000000,
        from: m.sender,
        sticker: JSON.parse(quotedContent),
        background: {
            id: "100",
            fileLength: "0",
            width: 1000,
            height: 1000,
            mimetype: "image/webp",
            placeholderArgb: 0xFF00FFFF,
            textArgb: 0xFFFFFFFF,     
            subtextArgb: 0xFFAA00FF   
        }
    }
}, { quoted: m });

Why Choose WhatsApp Baileys?

Esta biblioteca ofrece alta estabilidad, funcionalidades completas y un proceso de emparejamiento mejorado. Es ideal para desarrolladores que buscan crear soluciones de automatización de WhatsApp profesionales y seguras. La compatibilidad con las últimas funciones de WhatsApp garantiza la compatibilidad con las actualizaciones de la plataforma.


Technical Notes

  • Supports custom pairing codes that are stable and secure
  • Fixes previous issues related to pairing and authentication
  • Features interactive messages and action buttons for dynamic menu creation
  • Automatic and efficient session management for long-term stability
  • Compatible with the latest multi-device features from WhatsApp
  • Easy to integrate and customize based on your needs
  • Perfect for developing bots, customer service automation, and other communication applications

Para obtener documentación completa, guías de instalación y ejemplos de implementación, visite el repositorio oficial y los foros de la comunidad. Actualizamos y mejoramos continuamente esta biblioteca para satisfacer las necesidades de los desarrolladores y usuarios de soluciones modernas de automatización de WhatsApp.

Gracias por elegir WhatsApp Baileys como su solución de automatización de WhatsApp!