> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fs.soquincy.qzz.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Freesona Module Management: Enable and Disable at Runtime

> Freesona's optional modules can be toggled on or off without restarting the bot. Use /module commands to manage them from Discord.

Freesona splits its features into **core** modules that always load and **optional** modules you can enable or disable at runtime — no restart, no config file edits. Use `/module` commands directly in Discord to control what's active. Enabled/disabled state is saved to `config.json` and survives restarts automatically.

## Module Types

**Core modules** are always loaded and cannot be toggled:

| Module   | Description                                   |
| -------- | --------------------------------------------- |
| `help`   | Custom help panel                             |
| `ping`   | Bot and API latency probe                     |
| `status` | Bot status information                        |
| `admin`  | Module, model, provider, and runtime controls |

**Optional modules** are toggleable at runtime:

| Module       | Description                                                                                        |
| ------------ | -------------------------------------------------------------------------------------------------- |
| `genai`      | AI commands (`~ask`, `~write`, `~search`), persona management, long-term memory, and autonomy mode |
| `math`       | `~math` — equation solving via local SymPy and Wolfram\|Alpha                                      |
| `news`       | RSS/Atom feed fetching and auto-posting to a configured channel                                    |
| `ytdlp`      | `~download` and `~audio` — video and audio downloads via yt-dlp                                    |
| `mvsep`      | `~separate` — vocal/instrumental separation via the MVSEP API (requires `ytdlp`)                   |
| `moderation` | Kick, ban, softban, timeout, purge, slowmode, lock/unlock                                          |
| `warns`      | Warning system with per-guild history and auto-threshold actions                                   |
| `hello`      | `~hello`                                                                                           |
| `random`     | `~coinflip`, `~roll`, `~pick`, `~randommember`                                                     |
| `chroma`     | ChromaDB knowledge base commands (`/kbadd`, `/kblist`, `/kbdelete`, `/kbsearch`)                   |

## Commands

Manage optional modules with these slash commands:

| Command                  | What it does                                                                        |
| ------------------------ | ----------------------------------------------------------------------------------- |
| `/module list`           | List all optional modules with their enabled/disabled state and current load status |
| `/module enable <name>`  | Enable and immediately load a module                                                |
| `/module disable <name>` | Disable and unload a module                                                         |
| `/module reload <name>`  | Reload an already-enabled module — useful after making config changes               |

Module names support autocomplete in Discord — start typing and the bot suggests matching names.

<Note>
  All `/module` commands require **Administrator** permission.
</Note>

<Warning>
  The `mvsep` module requires `ytdlp` to be enabled — the bot enforces this dependency at runtime. Attempting to enable `mvsep` while `ytdlp` is disabled, or to disable `ytdlp` while `mvsep` is active, will raise an error.
</Warning>

## Module State Persistence

* Enabled/disabled state is stored in `config.json` under the `enabled_modules` key.
* State persists across bot restarts — you only need to configure it once.
* When you enable or disable a module, Freesona automatically re-syncs slash commands so Discord's command list stays accurate.

## Example Workflow

<Steps>
  <Step title="Check what's running">
    Run `/module list` to see every optional module's current enabled state and whether it's loaded in memory.
  </Step>

  <Step title="Disable a module you don't need">
    Run `/module disable hello` to unload the `hello` module. The bot confirms the unload and re-syncs slash commands.
  </Step>

  <Step title="Verify the change">
    Run `/module list` again — `hello` should now show as disabled.
  </Step>

  <Step title="Re-enable it">
    Run `/module enable hello` to load it back. Slash commands are re-synced automatically.
  </Step>
</Steps>
