Chrxmaticc Framework

1.4.0 · active · verified Sun Apr 19

Chrxmaticc Framework is a feature-rich, 'batteries-included' framework for developing Discord bots using `discord.js v14`. As of version 1.4.0, it provides out-of-the-box support for music via Lavalink, AI integration, a user experience (XP) system, and PostgreSQL database persistence, designed to streamline bot development with minimal boilerplate. The framework emphasizes a quick setup, allowing developers to create functional bots with core features in roughly ten lines of code. A significant major release, v2.0.0, is planned or recently released, which introduces a new `ChrxCommandBuilder` for simplified command creation, replacing some of the standard `discord.js` boilerplate. This framework aims for a steady release cadence, providing new features and improvements primarily focused on simplifying common Discord bot functionalities, targeting developers who prefer an opinionated, all-in-one solution rather than assembling individual packages.

Common errors

Warnings

Install

Imports

Quickstart

This setup initializes a ChrxClient instance with full capabilities, including Lavalink music, XP system, PostgreSQL database, and AI integration, all configured via environment variables.

require("dotenv").config();
const { ChrxClient } = require("chrxmaticc-framework");

const bot = new ChrxClient({
  token: process.env.BOT_TOKEN ?? '',

  lavalink: {
    host: process.env.LAVA_HOST ?? 'localhost',
    port: parseInt(process.env.LAVA_PORT ?? '2333'),
    password: process.env.LAVA_PASS ?? 'youshallnotpass',
    secure: process.env.LAVA_SECURE === 'true',
  },

  modules: {
    music: true,
    xp: true,
    database: process.env.DATABASE_URL ?? '',
    ai: {
      apiKey: process.env.AI_KEY ?? '',
      model: "gpt-3.5-turbo",
      provider: "openai", // or "anthropic"
    },
  },
});

bot.start();

view raw JSON →