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

simple-dcjs

v1.0.1

Published

A simple wrapper for discord.js to simplify bot creation and management

Readme

Simple Discord Js

Simple Discord Js brings WhatsApp Baileys syntax to Discord.js, letting you create rich messages, buttons, modals, and selects with familiar, intuitive APIs. Simplify Discord bot development with Baileys-like message structures.

npm version Discord.js Node.js License: MIT

📦 Installation

npm install simple-dcjs

🚀 Quick Start

const { SatzzBot } = require('simple-dcjs');

const bot = new SatzzBot({
  prefix: '!',
  intents: [
    'Guilds',
    'GuildMessages',
    'MessageContent',
    'GuildMessageReactions'
  ]
});

// Add a simple command
bot.addCommand('ping', async (message) => {
  await bot.sendMessage(message.channel.id, { text: 'Pong! 🏓' });
});

// Handle button interactions
bot.onButton('my_button', async (interaction) => {
  await interaction.reply({ content: 'Button clicked!', ephemeral: true });
});

// Login with your Discord token
bot.login('YOUR_DISCORD_TOKEN');

🚀 Features

  • Baileys-Like Syntax: Send images/videos with image: { url }, buttons as arrays, lists with sections/rows
  • Discord Native Components: Select menus (user/role/channel), modals, action rows
  • Media Support: Images, videos, audio with captions
  • Interactions: Button handlers, select menus, modal submits with ephemeral replies
  • Message Components v2: Advanced message structuring with containers, sections, and more

Embed

  await bot.sendMessage(message.channel.id, {
    title: 'Test Embed',
    description: 'This is a test embed created with Baileys-like syntax',
    color: 0x0099ff,
    fields: [
      { name: 'Field 1', value: 'Value 1', inline: true },
      { name: 'Field 2', value: 'Value 2', inline: true },
    ],
    footer: { text: 'Footer text' },
    timestamp: new Date(),
  });

Embed With Image

  await bot.sendMessage(message.channel.id, {
    title: 'Image Embed',
    description: 'Embed with thumbnail and image',
    color: 0x00ff00,
    thumbnail: 'https://picsum.photos/seed/thumbnail/150/150',
    image: 'https://picsum.photos/seed/image/400/300',
  });

Image

  await bot.sendMessage(message.channel.id, {
    image: { url: 'https://picsum.photos/seed/random/500/400' },
    caption: 'This is an image sent with Baileys-style syntax! 📸'
  });

Video

await bot.sendMessage(message.channel.id, {
    video: { url: 'https://www.w3schools.com/html/mov_bbb.mp4' },
    caption: 'Sample video 🎥'
  });

Audio

  await bot.sendMessage(message.channel.id, {
    audio: { url: 'https://cdn.discordapp.com/attachments/1420854986148941848/1436954304354189392/life_force.mp3?ex=692d2afb&is=692bd97b&hm=ae0595d28b55d81f1fc3aac6e063663b8c26e89c11681227e590b05aa20a4027&' }
  });

Buttons

await bot.sendMessage(message.channel.id, {
    text: 'Choose an option:',
    buttons: [
      { id: 'btn_primary', label: 'Primary', style: 'primary' },
      { id: 'btn_success', label: 'Success ✅', style: 'success' },
      { id: 'btn_danger', label: 'Danger ❌', style: 'danger' }
    ]
  });

Select

  const selectMenu = bot.createSelectMenu({
    customId: 'string_select',
    placeholder: 'Choose an option',
    options: [
      { label: 'Option 1', value: 'opt1', description: 'First option', emoji: '1️⃣' },
      { label: 'Option 2', value: 'opt2', description: 'Second option', emoji: '2️⃣' },
      { label: 'Option 3', value: 'opt3', description: 'Third option', emoji: '3️⃣' },
    ],
  });

  const row = bot.createActionRow(selectMenu);

  await bot.sendMessage(message.channel.id, {
    text: 'Select an option:',
    components: [row]
  });

Select User

  const userSelect = bot.createUserSelectMenu({
    customId: 'user_select',
    placeholder: 'Select a user',
    minValues: 1,
    maxValues: 3,
  });

  const row = bot.createActionRow(userSelect);

  await bot.sendMessage(message.channel.id, {
    text: 'Select up to 3 users:',
    components: [row]
  });

Select Role

const roleSelect = bot.createRoleSelectMenu({
    customId: 'role_select',
    placeholder: 'Select a role',
  });

  const row = bot.createActionRow(roleSelect);

  await bot.sendMessage(message.channel.id, {
    text: 'Select a role:',
    components: [row]
  });

Select Channel

const channelSelect = bot.createChannelSelectMenu({
    customId: 'channel_select',
    placeholder: 'Select a channel',
  });

  const row = bot.createActionRow(channelSelect);

  await bot.sendMessage(message.channel.id, {
    text: 'Select a channel:',
    components: [row]
  });

ComponentV2

bot.addCommand('componentv2', async (message) => {
  await bot.sendMessage(message.channel.id, {
    container: [
      {
        type: 'text',
        content: 'Testing Message Components v2:'
      },
      {
        type: 'section',
        texts: ['Welcome to Message Components v2!', 'This is a new way to structure messages.'],
        button: {
          id: 'section_btn',
          label: 'Click Me',
          style: 'primary',
          emoji: '👋'
        },
        thumbnail: 'https://picsum.photos/seed/picsum/200/300'
      },
      {
        type: 'section',
        texts: ['Welcome to Message Components v2!', 'This is a new way to structure messages.'],
        button: {
          id: 'section_btn',
          label: 'Click Me',
          style: 'primary',
          emoji: '👋'
        },
      },
      {
        type: 'buttons',
        buttons: [
          { id: 'btn1', label: 'Button 1', style: 'primary' },
          { id: 'btn2', label: 'Button 2', style: 'secondary', emoji: '⭐' },
          { label: 'Link', style: 'link', url: 'https://discord.js.org' }
        ]
      },
      {
        type: 'select',
        customId: 'container_select',
        placeholder: 'Choose from container',
        options: [
          { label: 'Option A', value: 'a', emoji: '🔴' },
          { label: 'Option B', value: 'b', emoji: '🔵' }
        ]
      },
      {
        type: 'image',
        url: 'https://picsum.photos/seed/picsum/200/300'
      }
    ]
  });
});

🎛 API Reference

Sending Messages

// Text
{ text: 'Hello!' }

// Embed
{ title: 'Embed', description: 'Content', color: 0x0099ff }

// Baileys Buttons
{ text: 'Click', buttons: [{ buttonId: 'id', buttonText: { displayText: 'Label' }, type: 1 }] }

// List/Sections
{ sections: [{ title: 'Food', rows: [{ title: 'Pizza', rowId: 'pizza' }] }] }

Components

  • bot.createButton({ customId, label, style })
  • bot.createSelectMenu({ customId, options })
  • bot.createActionRow(components)

🤝 Contributing

Fork, add features/tests, submit PRs. Focus on new Baileys features or Discord interactions.

📄 License

MIT - Free to use/modify. No warranty.