Skip to content

atex-ovi/atexovi-baileys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

atexovi-baileys

npm version npm total downloads Node.js version TypeScript version License MIT
Saweria Telegram Facebook WhatsApp GitHub



Atex Ovi Logo

Custom implementation of the official Baileys WhatsApp Web API, optimized and patched for personal projects and private bot frameworks.


Table of Contents


Demo / Screenshot


Features & Supported UI Types

Atexovi-Baileys supports a variety of interactive WhatsApp message types and core features optimized for multi-device bots:

Feature / UI Type Description
List Button Menus Single select menus for users to choose one option.
Quick Reply Buttons Simple tap buttons for quick responses.
CTA URL Buttons Opens external links in browser.
CTA Call Buttons Directly initiate a call to a phone number.
Copy Buttons Copies a pre-defined text or URL to clipboard.
Button Combinations Mix multiple button types in a single message.
Multi-Device Support Works seamlessly with WhatsApp Multi-Device API.
Encrypted Messaging Uses libsignal from Meta for secure communication.
Optimized Media Handling Efficient media downloading and decoding.
Custom Patches & Fixes Improved connection stability and bug fixes.

Note

All other APIs and core features follow Baileys official


Installation

Important

The current latest version (v7.5.6) is not recommended due to known issues, including occasional connection losses and pairing problems with WhatsApp. Please note that the RC version is not final and is still under active development. Further improvements and fixes will continue to be made. Use it primarily for testing and evaluation purposes. For a stable and tested experience, you can install the release candidate version by running:

npm
npm install atexovi-baileys@7.5.6-rc.5
yarn
yarn add atexovi-baileys@7.5.6-rc.5
pnpm
pnpm add atexovi-baileys@7.5.6-rc.5

Module Import and Export

1. ESM (ECMAScript Module)

If your package.json uses "type": "module":

Import:

import { sendMessage, someFunction } from 'atexovi-baileys';

Export:

export function someFunction() {
  // your code here
}

2. CJS (CommonJS)

If you are using CommonJS (no "type" or "type": "commonjs" in your package.json):

Import:

const { sendMessage, someFunction } = require('atexovi-baileys');

Export:

module.exports = {
  // your code here
};

Example Usage (Interactive Message Button)

Note

All interactive button examples in this README use ESM syntax, so you can just do:

import { sendMessage } from 'atexovi-baileys';

1. List Button

Show Example
await sock.sendMessage(jid, {
  text: 'Choose an option from the list:',
  title: 'List Menu',
  subtitle: 'Select one',
  footer: 'Sent by Atex Ovi',
  interactiveButtons: [
    {
      name: 'single_select',
      buttonParamsJson: JSON.stringify({
        title: 'Select Option',
        sections: [
          {
            title: 'Main Options',
            highlight_label: 'Recommended',
            rows: [
              { header: 'Header 1', title: 'Option 1', description: 'Description 1', id: 'id1' },
              { header: 'Header 2', title: 'Option 2', description: 'Description 2', id: 'id2' }
            ]
          }
        ]
      })
    }
  ]
});

2. Call Button

Show Example
await sock.sendMessage(jid, {
  text: 'Need help? Call us!',
  title: 'Support',
  subtitle: 'We are available',
  footer: 'Sent by Atex Ovi',
  interactiveButtons: [
    {
      name: 'cta_call',
      buttonParamsJson: JSON.stringify({
        display_text: 'Call Now',
        phone_number: '+6281234567890'
      })
    }
  ]
});

3. URL Button

Show Example
await sock.sendMessage(jid, {
  text: 'Check out our GitHub page!',
  title: 'GitHub',
  subtitle: 'Atex Ovi Repository',
  footer: 'Sent by Atex Ovi',
  interactiveButtons: [
    {
      name: 'cta_url',
      buttonParamsJson: JSON.stringify({
        display_text: 'Visit GitHub',
        url: 'https://github.com/atex-ovi',
        merchant_url: 'https://github.com/atex-ovi'
      })
    }
  ]
});

4. Quick Reply Button

Show Example
await sock.sendMessage(jid, {
  text: 'Choose quickly!',
  title: 'Quick Reply',
  subtitle: 'Tap one button',
  footer: 'Sent by Atex Ovi',
  interactiveButtons: [
    {
      name: 'quick_reply',
      buttonParamsJson: JSON.stringify({
        display_text: 'Click Me!',
        id: 'quick_id'
      })
    }
  ]
});

5. Copy Button

Show Example
await sock.sendMessage(jid, {
  text: 'Copy this link:',
  title: 'Copy Example',
  subtitle: 'Click the button to copy',
  footer: 'Sent by Atex Ovi',
  interactiveButtons: [
    {
      name: 'cta_copy',
      buttonParamsJson: JSON.stringify({
        display_text: 'Copy Link',
        copy_code: 'https://github.com/atex-ovi'
      })
    }
  ]
});

6. Combination All Button

Show Example
await sock.sendMessage(jid, {
  text: 'This is an interactive message!',
  title: 'Hello!',
  subtitle: 'Subtitle here',
  footer: 'Sent by Atex Ovi',
  interactiveButtons: [
    {
      name: 'single_select',
      buttonParamsJson: JSON.stringify({
        title: 'Choose an Option',
        sections: [
          {
            title: 'Main Options',
            highlight_label: 'Recommended',
            rows: [
              { header: 'Header 1', title: 'Option 1', description: 'Description 1', id: 'id1' },
              { header: 'Header 2', title: 'Option 2', description: 'Description 2', id: 'id2' }
            ]
          }
        ]
      })
    },

    {
      name: 'cta_call',
      buttonParamsJson: JSON.stringify({
        display_text: 'Call Me',
        phone_number: '+6281234567890'
      })
    },

    {
      name: 'cta_url',
      buttonParamsJson: JSON.stringify({
        display_text: 'Visit GitHub',
        url: 'https://github.com/atex-ovi',
        merchant_url: 'https://github.com/atex-ovi'
      })
    },

    {
      name: 'quick_reply',
      buttonParamsJson: JSON.stringify({
        display_text: 'Click Me!',
        id: 'quick_id'
      })
    },
    
    {
      name: 'cta_copy',
      buttonParamsJson: JSON.stringify({
        display_text: 'Copy Link',
        copy_code: 'https://github.com/atex-ovi'
      })
    }
  ]
});

Disclaimer

Caution

  • This is a modified version of the official Baileys WhatsApp Web API for personal projects and private bot frameworks.
  • Please respect WhatsApp's terms of service.
  • All core APIs and features remain based on Baileys official; this modification does not bypass or alter WhatsApp restrictions.
  • Use responsibly and at your own risk.

Documentation

For full documentation, please refer to Baileys official GitHub


Requirements

  • 🟢 Node.js >= 20 Node.js version
  • Supports multi-device WhatsApp
  • Dependencies installed via npm install

Support

If you find this project useful, consider supporting the development:

Buy Me A Coffee


License

MIT