# Configuration

### 📁 File Structure

All configuration files for SupportBot are located in the `/Configs` directory. These files use the **YAML** format, which is easy to read but requires precise spacing.

| File                | Description                                                                    |
| ------------------- | ------------------------------------------------------------------------------ |
| `supportbot.yml`    | **Main Settings**: The core configuration for the bot. Start here!             |
| `commands.yml`      | **Commands**: Configure command names, descriptions, and permissions.          |
| `messages.yml`      | **Messages**: Customize all text responses, embeds, and bot messages.          |
| `ticket-panel.yml`  | **Ticket Panel**: Customize the look and feel of your ticket creation message. |
| `supportbot-ai.yml` | **AI Settings**: Manage AI behaviour, prompts, and thread management.          |
| `api.yml`           | **Dashboard API**: Settings for connecting to the web dashboard.               |

***

### ⚙️ Detailed Overview

#### 1. `supportbot.yml`&#x20;

This file handles the bot's identity and main functionality.

* **General**: Bot token and basic metadata.
* **Roles**: Define which Discord roles have Admin, Moderator, or Staff permissions.
* **Tickets**: Set the Ticket Category ID, Ticket Archive Category, and choose between `channels` or `threads`.
* **Departments**: Define your support categories (e.g., Billing, Support, Reports).

#### 2. `commands.yml`

Allows you to rename commands and restrict them to specific roles.

* Change `/ticket` to `/help` or any name you prefer.
* Set permissions for utility commands like `/settings` or `/mod`.

#### 3. `messages.yml`

Every single piece of text the bot sends can be found here.

* Supports placeholders like `%user%`, `%ticketid%`, and `%reason%`.
* Customize embed titles, descriptions, and footer text.

#### 4. `ticket-panel.yml`

Controls the "Create Ticket" message that users see.

* **Layouts**: Choose from 4 different embed styles.
* **Buttons**: Customize the label, emoji, and color of the creation button.

#### 5. `supportbot-ai.yml`

If you use the AI module, this file manages:

* **Prompts**: The instructions given to the AI.
* **Behavior**: How the AI interacts with users in ticket threads.

***

### ⚠️ Configuration Best Practices

To ensure your bot runs correctly, keep these tips in mind:

> **YAML Spacing Matters**: Never use "Tabs" in these files. Use exactly **2 spaces** for indentation. If the spacing is wrong, the bot will fail to start.

* **Avoid Special Characters**: If you use characters like `:` or `#` in a message, wrap the entire message in double quotes (e.g., `Message: "Error: #1234"`).
* **Backup Your Configs**: Before making large changes, save a copy of your working config files.
* **Use the Dashboard**: Most of these settings can be edited visually at [supportbot.emeraldsrtv.dev](https://supportbot.emeraldsrtv.dev), which automatically handles formatting for you!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://emerald-services.gitbook.io/emeraldsrv/bots/supportbot/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
