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.
npm install chrxmaticc-frameworkVerified import paths — ran on the pinned version, not inferred.
This setup initializes a ChrxClient instance with full capabilities, including Lavalink music, XP system, PostgreSQL database, and AI integration, all configured via environment variables.
Migrate your command files to use `new ChrxCommandBuilder({...})` syntax as detailed in the v2.0.0 documentation. This involves defining `name`, `description`, `options`, `cooldown`, and the `run` method directly within the builder.Ensure `LAVA_HOST`, `LAVA_PORT`, `LAVA_PASS` are correctly set in your `.env` file and match your Lavalink server's configuration. Use port 443 with `secure: true` for SSL/TLS connections, otherwise use 2333 (default) with `secure: false`.
Always use a `.env` file and `require('dotenv').config();` at the very top of your main bot file. Double-check all required environment variables are present and correctly formatted, especially API keys and URLs.Always install both packages: `npm install chrxmaticc-framework discord.js`.
Ensure your `.env` file has `BOT_TOKEN=YOUR_DISCORD_BOT_TOKEN` and that `YOUR_DISCORD_BOT_TOKEN` is the correct token from the Discord Developer Portal.
Verify that your Lavalink server is running and accessible. Check `LAVA_HOST`, `LAVA_PORT`, `LAVA_PASS`, and `LAVA_SECURE` in your `.env` file. Ensure firewall rules allow connection.
Run `npm install discord.js` in your project directory.
Add `require("dotenv").config();` at the very top of your main bot file (e.g., `index.js` or `bot.js`) to load variables from your `.env` file into `process.env`.Ensure `modules: { ai: { apiKey: process.env.AI_KEY, ... } }` is present in your ChrxClient options and `AI_KEY` is correctly set in your `.env` file.