# Presets

## Preset Configuration Guide

The `presets.json` file is used to define various embed configurations for your Discord bot. Each preset includes specific properties to customize how the embed looks and behaves.

### Structure of `presets.json`

The `presets.json` file contains multiple presets, each identified by a unique key. Here's a breakdown of the components used in each preset:

#### Key Components

1. **Preset Name:**
   * Each preset is identified by a unique key (e.g., `link_button_example`, `dm_button_example`). This key is used to reference the preset in the bot's code.
2. **Title:**
   * The `title` property sets the title of the embed message.
   * Example: `"title": "Welcome to Our Server!"`
3. **Description:**
   * The `description` property provides the main content or message of the embed.
   * Example: `"description": "We're glad you're here. This embed showcases all three button types in one message."`
4. **Color:**
   * The `color` property sets the color of the embed sidebar using a hexadecimal color code.
   * Example: `"color": "#3498db"`
5. **Footer:**
   * The `footer` property adds a footer text to the embed, typically for additional information or context.
   * Example: `"footer": "Click the button below to visit our website"`
6. **Thumbnail:**
   * The `thumbnail` property adds a small image to the top right of the embed, typically a logo or icon.
   * Example: `"thumbnail": "https://example.com/logo.png"`
7. **Buttons:**
   * The `buttons` array defines interactive buttons attached to the embed. Each button has several properties:
     * **label:** The text displayed on the button.
     * **type:** The action type of the button. Possible values include `Link`, `DirectMessage`, and `ReactionRole`.
     * **style:** The button's visual style. Common styles are `Primary`, `Secondary`, `Success`, `Danger`, and `Link`.
     * **url:** (For `Link` type) The URL that the button will open.
     * **customId:** (For `DirectMessage` and `ReactionRole` types) A unique identifier for the button action.
     * **message:** (For `DirectMessage` type) The message content to be sent via DM.
     * **roleID:** (For `ReactionRole` type) The ID of the role to be assigned to the user.
     * **DM:** (For `ReactionRole` type) Boolean to send a DM notification to the user upon role assignment.

#### Example Preset

Here is an example preset from the file that demonstrates how to create a simple embed with a link button:

```json
{
  "link_button_example": {
    "title": "External Resources",
    "description": "Check out our official website for more information about our community!",
    "color": "#3498db",
    "footer": "Click the button below to visit our website",
    "thumbnail": "https://example.com/logo.png",
    "buttons": [
      {
        "label": "Visit Our Website",
        "type": "Link",
        "style": "Link",
        "url": "https://example.com"
      }
    ]
  }
}

```

#### Creating a New Preset

To create a new preset, follow these steps:

1. **Define a unique key** for your preset. This key will be used in the bot code to reference the preset.
2. **Set the title and description** to describe what the embed is for.
3. **Choose a color** for the embed's sidebar using a hex code.
4. **Add a footer and thumbnail** if desired.
5. **Define buttons** in the `buttons` array with appropriate actions:
   * For a **link button**, provide the URL.
   * For a **DM button**, specify the message content.
   * For a **reaction role button**, specify the role ID and whether to send a DM.

By following this structure and using the provided examples, you can create customized presets that suit your server's needs and enhance interactions with members.


---

# 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://docs.madebylofi.net/docs/discord-bots/embedz/presets.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.
