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

# Embed Scripting

> Using @curse' scripting engine, you can create professional, interactive, and dynamic embeds that bring your server’s automated messages to life.

<Tip>
  You can view the full list of available variables, such as `{user}`, `{user.mention}`, or `{guild.name}` @ [https://docs.cursebot.site/resources/variables](https://docs.cursebot.site/resources/variables) . These dynamic tags are replaced with real-time information when the message is sent.
</Tip>

## 1. Scripting Structure

Understanding the syntax is the first step to building perfect embeds. Every parameter in a **@curse** script is a key-value pair wrapped in brackets.

* `{`**:** Every parameter begins with an opening curly bracket.
* `:`**:** This separates the parameter name (the "key") from the actual content (the "value").
* `$v`**:** Use this symbol to separate different parameters within the same message.
* `}`**:** Every parameter must be closed with a curly bracket.

## 2. Core Parameters

These are the foundational building blocks used to construct the main body of your embed.

| **Parameter** | Description                                          | Example Content            |
| :------------ | ---------------------------------------------------- | -------------------------- |
| URL           | Attaches a clickable link to the embed title.        | `https://cursebot.site`    |
| Color         | Sets the sidebar color of the embed using hex codes. | `#5865F2`                  |
| Title         | The bolded heading at the top of your embed.         | `Welcome to the server!`   |
| Description   | The main body of text for your message.              | `Enjoy your stay, {user}!` |
| Image         | A large image displayed at the bottom of the embed.  | `Direct Image URL`         |
| Thumbnail     | A smaller image displayed in the top-right corner.   | `Direct Image URL`         |
| Timestamp     | Adds the current time to the footer of the embed.    | *(No arguments needed)*    |

<Warning>
  Some sections of an embed require multiple pieces of information. For these, use `&&` to separate the different arguments.
</Warning>

<Accordion iconType="regular" title="Author">
  Personalize the very top of the embed with a name, an optional icon, and an optional link.

  * **name** `Required`: *The display name of the author.*
  * **icon** `Optional`: *The URL for the author’s icon image.*
  * **url** `Optional`: *A clickable URL attached to the author’s name.*

  <CodeGroup>
    ```javascript File Example theme={null}
    {author: {user.username} && {user.avatar} && https://example.xyz}
    ```

    ```javascript File Syntax theme={null}
    {author: name && icon url && link}
    ```
  </CodeGroup>
</Accordion>

<Accordion iconType="regular" title="Field">
  Organize your information into structured, easy-to-read sections rather than a single block of text.

  * **name** `Required`: *The bolded title or header of the field.*
  * **value** `Required`: *The main text content or data within the field.*
  * **inline** `Optional`: *Add this keyword at the very end to place multiple fields side-by-side horizontally.*

  <CodeGroup>
    ```javascript File Example theme={null}
    {field: {user} && this is the value && inline}
    ```

    ```javascript File Syntax theme={null}
    {field: name && value && inline}
    ```
  </CodeGroup>
</Accordion>

<Accordion iconType="regular" title="Footer">
  The small sub-text located at the very bottom of the embed, ideal for timestamps or extra metadata.

  * **text** `Required`: *The primary message displayed in the footer.*
  * **icon** `Optional`: *A small icon image displayed to the left of the footer text.*

  <CodeGroup>
    ```javascript File Example theme={null}
    {footer: {user} && {user.avatar}}
    ```

    ```javascript File Syntax theme={null}
    {footer: text && icon}
    ```
  </CodeGroup>
</Accordion>

## 3. Frequently Asked Questions

### **3. 1. How do I add a new line to my description?**

To create a line break within your script, simply press **SHIFT + ENTER**. The script will recognize the visual gap as a new line in the final embed.

### **3. 2. Why isn’t my embed code working for some commands?**

Some **@curse** commands support both plain text and embeds. To tell the bot you are using a script, you must start your code with the `{embed}$v` prefix.

```
;welcome add #channel {embed}$v{message: Welcome! {user.mention}}{title: New Member!}
```

### 3. 3. Can I use multiple fields in a single embed?

Yes, you can use multiple `{field: ...}` tags within one script. To organize them side-by-side, ensure you include the `inline` keyword at the end of each field argument.

### 3. 4. What happens if I don't provide an icon for the author or footer?

The `icon` argument for both the author and footer objects is optional. If left blank, the embed will simply display the text or name without a small image next to it.
