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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@nexon.js/prime

v8.2.12

Published

Simplicity WhatsApp Bot (Baileys)

Readme

Simplicity WhatsApp Bot (Baileys)

Simplicity WhatsApp Bot is a lightweight and easy-to-use bot built using the Baileys library for WhatsApp. This bot allows you to interact with users on WhatsApp and respond to commands seamlessly.

Features

  • Respond to user messages
  • Support for multiple command prefixes
  • Easy to extend with plugins
  • Lightweight and efficient

Event Message Structure

The bot listens for incoming messages and processes them. Below is an example of the event message structure that the bot handles:

{
   m: {
      key: {
         remoteJid: '[email protected]',
         fromMe: false,
         id: 'NXN5E1FB9C33178CD11673178C46CA1E',
         participant: undefined
      },
      messageTimestamp: 1689557472,
      pushName: 'Kens Ransyah',
      broadcast: false,
      message: Message {
         extendedTextMessage: [ExtendedTextMessage],
         messageContextInfo: [MessageContextInfo]
      },
      id: 'NXN5E1FB9C33178CD11673178C46CA1E',
      isBot: false,
      chat: '[email protected]',
      fromMe: false,
      isGroup: false,
      sender: '[email protected]',
      mtype: 'extendedTextMessage',
      msg: ExtendedTextMessage {
         text: '.menu',
         previewType: 0,
         contextInfo: [ContextInfo],
         inviteLinkGroupTypeV2: 0
      },
      quoted: null,
      mentionedJid: [],
      reply: [Function(anonymous)],
      text: '.menu'
   },
   body: '.menu',
   prefix: '.',
   plugins: [],
   commands: [],
   args: [],
   command: 'menu',
   text: '',
   prefixes: ['.', '#', '!', '/']
}

Explanation of the Structure

  • m: Contains the message metadata and content.

  • key: Unique identifier for the message.

  • remoteJid: The WhatsApp ID of the sender.

  • fromMe: Indicates if the message is sent by the bot.

  • id: Unique ID of the message.

  • participant: The participant in a group chat (if applicable).

  • messageTimestamp: Timestamp of when the message was sent.

  • pushName: The display name of the sender.

  • broadcast: Indicates if the message is a broadcast.

  • message: Contains the actual message content.

  • extendedTextMessage: The type of message (in this case, extended text).

  • id: Duplicate of the message ID.

  • isBot: Indicates if the sender is a bot.

  • chat: The chat ID where the message was sent.

  • fromMe: Indicates if the message was sent by the bot.

  • isGroup: Indicates if the message was sent in a group.

  • sender: The sender's WhatsApp ID.

  • mtype: The type of message (e.g., extended text).

  • msg: The message object containing the text and other properties.

  • quoted: Any quoted message (if applicable).

  • mentionedJid: List of mentioned users in the message.

  • reply: Function to reply to the message.

  • text: The text content of the message.

  • body: The raw text of the message.

  • prefix: The command prefix used (e.g., .).

  • plugins: List of plugins used in the bot.

  • commands: List of commands available.

  • args: Arguments passed with the command.

  • command: The command that was executed (e.g., menu).

  • text: Additional text (if any).

  • prefixes: List of supported command prefixes.

Getting Started

To get started with the Simplicity WhatsApp Bot, follow these steps:

  1. Clone the repository:
git clone https://github.com/KensBot/nexon-bot.git
  1. Navigate to the project directory:
cd nexon-bot
  1. Install the required dependencies:
npm install
  1. Configure your WhatsApp credentials and settings.

  2. Run the bot

npm start

Contributing

Contributions are welcome! If you have suggestions or improvements, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Support

For support, please open an issue on the GitHub repository or contact the maintainer directly. Your feedback is valuable and helps improve the bot.

Acknowledgments

Thanks to the Baileys library for providing a robust framework for building WhatsApp bots. Special thanks to the open-source community for their contributions and support.