Absolet’s addon system lets you extend the bot with extra slash commands and Discord event listeners without modifying any core source files. An addon is a self-contained folder that exports a structured object; the bot discovers and mounts it automatically on startup. This makes addons easy to share, version-control independently, and drop in or remove without touching built-in logic.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/devjhoan/absolet/llms.txt
Use this file to discover all available pages before exploring further.
How the Addon Loader Works
During startup,Client.ts runs loadAddons(), which uses a glob pattern to find every index.{js,ts} file under src/addons/**/:
src/structures/Client.ts
/help. Each addon’s events are wired directly to the Discord.js client, so they fire just like native event handlers.
Addon Structure
An addon module must export a default object conforming to theAddon type from absolet-addons:
| Field | Type | Description |
|---|---|---|
name | string | A unique identifier for the addon, used in startup logs. |
commands | Command[] | An array of command objects, each with name, description, and a run handler. |
events | Event[] | An array of event objects, each with an event name and a run handler. Can be an empty array. |
Installing an Addon
Place the addon folder in src/addons/
Create a directory at
src/addons/<your-addon-name>/ and add your index.ts (or index.js) entry file inside it. The loader picks up any index file one or more levels deep under src/addons/.Register each command in config/commands.yml
For every command name your addon exports, add a corresponding entry to The key must be the PascalCase version of the command name (e.g.
config/commands.yml:config/commands.yml
hello → Hello, my-command → MyCommand). The Permissions array contains the Discord role IDs allowed to run the command.Minimal Addon Example
src/addons/my-addon/index.ts
config/commands.yml, the /hello command will appear in /help and be usable by members with the specified role:
config/commands.yml
Addon Commands in /help
Commands registered through addons are stored in the sameclient.commands collection as built-in commands, with directory set to "general". They are included in Discord’s slash command registry (application.commands.set) on the next startup after they are added, and they appear in /help alongside all other available commands.