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

cordix-builders

v1.0.0

Published

A modern toolkit for building structured and interactive Discord message components using Cordix.

Readme

cordix-builders 🧩

cordix-builders is a modern toolkit for building advanced and structured Discord message components with ease. Designed for use with the Cordix library, it provides a clean, chainable API to create embeds, buttons, select menus, modals, and more — all fully compatible with the Discord API.


Features

  • EmbedBuilder: Easily construct Discord embeds with chainable methods.
  • ButtonBuilder: Create interactive buttons with custom labels, styles, and actions.
  • ActionRowBuilder: Group components (buttons, menus) into action rows for Discord messages.
  • StringSelectMenuBuilder: Build select menus with custom options for string values.
  • StringSelectMenuOptionBuilder: Define options for select menus, including labels, values, descriptions, and emojis.
  • UserSelectMenuBuilder: Create menus for selecting users.
  • RoleSelectMenuBuilder: Create menus for selecting roles.
  • ChannelSelectMenuBuilder: Create menus for selecting channels, with channel type filtering.

Installation

npm install cordix-builders

Usage

Import the builders you need:

const {
  EmbedBuilder,
  ButtonBuilder,
  ActionRowBuilder,
  StringSelectMenuBuilder,
  StringSelectMenuOptionBuilder,
  UserSelectMenuBuilder,
  RoleSelectMenuBuilder,
  ChannelSelectMenuBuilder,
} = require("cordix-builders");

Example: EmbedBuilder

const embed = new EmbedBuilder()
  .setAuthor(
    "Author",
    "https://iili.io/F4VcHnR.png",
    "https://iili.io/F4VcHnR.png"
  )
  .setTitle("Embed Title")
  .setURL("https://iili.io/F4VcHnR.png")
  .setDescription("Embed description goes here.")
  .setColor(0x0099ff)
  .setTimestamp()
  .setImage("https://iili.io/F4VcHnR.png")
  .setThumbnail("https://iili.io/F4VcHnR.png")
  .setFooter("Footer text", "https://iili.io/F4VcHnR.png")
  .addField("Field Name", "Field Value");

// Send with Cordix:
client.sendMessage(channelId, { embed });

Example: ButtonBuilder & ActionRowBuilder

const button = new ButtonBuilder()
  .setLabel("Click Me")
  .setStyle("primary") // or 1
  .setCustomId("my_button");

const row = ActionRowBuilder(button);

client.sendMessage(channelId, {
  content: "Here's a button:",
  components: [row],
});

Example: StringSelectMenuBuilder

const menu = new StringSelectMenuBuilder()
  .setCustomId("menu_id")
  .setPlaceholder("Choose an option")
  .setMaxValues(1)
  .setMinValues(1)
  .addOption(
    new StringSelectMenuOptionBuilder()
      .setLabel("Option 1")
      .setValue("one")
      .setDescription("First option")
      .setEmojiId("1234567890")
  )
  .addOption(
    new StringSelectMenuOptionBuilder()
      .setLabel("Option 2")
      .setValue("two")
      .setDescription("Second option")
      .setEmojiId("0987654321")
  );

const row = ActionRowBuilder(menu);

client.sendMessage(channelId, {
  content: "Select an option:",
  components: [row],
});

Example: UserSelectMenuBuilder

const menu = new UserSelectMenuBuilder()
  .setCustomId("user_menu")
  .setPlaceholder("Select a user")
  .setMaxValues(1)
  .setMinValues(1);

const row = ActionRowBuilder(menu);

client.sendMessage(channelId, {
  content: "Pick a user:",
  components: [row],
});

UserSelectMenuBuilder Properties

| Method | Description | | ----------------- | -------------------------------------- | | setCustomId(id) | Set the custom ID for the select menu. | | setPlaceholder(s) | Set the placeholder text. | | setMaxValues(n) | Set the maximum selectable users. | | setMinValues(n) | Set the minimum selectable users. | | setDisabled() | Disable the menu. |


Example: RoleSelectMenuBuilder

const menu = new RoleSelectMenuBuilder()
  .setCustomId("role_menu")
  .setPlaceholder("Select a role")
  .setMaxValues(1)
  .setMinValues(1);

const row = ActionRowBuilder(menu);

client.sendMessage(channelId, {
  content: "Pick a role:",
  components: [row],
});

RoleSelectMenuBuilder Properties

| Method | Description | | ----------------- | -------------------------------------- | | setCustomId(id) | Set the custom ID for the select menu. | | setPlaceholder(s) | Set the placeholder text. | | setMaxValues(n) | Set the maximum selectable roles. | | setMinValues(n) | Set the minimum selectable roles. | | setDisabled() | Disable the menu. |


Example: ChannelSelectMenuBuilder

const menu = new ChannelSelectMenuBuilder()
  .setCustomId("channel_menu")
  .setPlaceholder("Select a channel")
  .setMaxValues(1)
  .setMinValues(1)
  .setChannelTypes([0, 2]); // 0: Text, 2: Voice, etc.

const row = ActionRowBuilder(menu);

client.sendMessage(channelId, {
  content: "Pick a channel:",
  components: [row],
});

ChannelSelectMenuBuilder Properties

| Method | Description | | -------------------- | ---------------------------------------------------- | | setCustomId(id) | Set the custom ID for the select menu. | | setPlaceholder(s) | Set the placeholder text. | | setMaxValues(n) | Set the maximum selectable channels. | | setMinValues(n) | Set the minimum selectable channels. | | setDisabled() | Disable the menu. | | setChannelTypes(arr) | Restrict selectable channel types (array of numbers) |



Additional Info

  • All builders use chainable methods for easy configuration.
  • You can combine multiple components in a single message.
  • Fully compatible with the Cordix library.

License

ISC

Author

ZombieXDev