a meowing, typesafe interaction router for discord.js
README.md

@purrkit/builders #

fluent, typesafe builders for Discord components and embeds, built with first-class support for Oceanic.js.

installation #

npm install @purrkit/builders oceanic.js

features #

  • fluent builder patterns for action rows, buttons, select menus (string, user, role, mentionable, channel), text inputs, and embeds.
  • toJSON() produces Oceanic-compatible component and embed objects with camelCase properties and Oceanic constants.
  • toRaw() produces raw Discord API snake_case objects.

example usage #

import { ActionRowBuilder, ButtonBuilder, ButtonStyles } from "@purrkit/builders";

const row = new ActionRowBuilder().addComponents(
	new ButtonBuilder().setCustomID("btn_click").setLabel("Click Me").setStyle(ButtonStyles.PRIMARY),
);

// row.toJSON() returns Oceanic ActionRow structure

copying #

this project is licensed under the european union public license (eupl) v1.2. you can find the full license text either here or on the official eupl website, which also contains translations of the license in various languages.