# Creating Custom Embeds with 7luxor

### How to Create an Embed

To create an embed, use raw text input structuring each component with `{}` and separate them using `$v`. You can include elements like title, description, color, thumbnail, and image. Enhance your embed by adding author details and a footer using specific placeholders for dynamic content. This modular approach allows for flexible and detailed embed customization.

#### Basic Structure

```
{title: Welcome to the server}
$v
{description: Hello {user.name}, enjoy your stay!}
$v
{color: #5865F2}
$v
{thumbnail: https://example.com/thumb.png}
$v
{image: https://example.com/image.png}
$v
{timestamp: now}
```

#### Add Author and Footer

```
{author: name: {user.display} && icon: {user.avatar}}
$v
{footer: text: Powered by Lux && icon: https://example.com/icon.png}
```

#### Add Fields

```
{field: name: Level && value: 12 && inline}
$v
{field: name: Rank && value: Gold}
```

#### Add Buttons (optional)

```
{button: label: Join Now && style: green && url: https://invite.link}
$v
{button: label: More Info && style: blue && url: https://docs.link}
```

#### Auto Delete Message (optional)

```
${delete: 10}
```

#### Add Plain Text Content (optional)

```
{content: Thanks for joining! Check below for more info.}
```

### Variables

Variables let you dynamically insert user and server information. Use them anywhere in your embed with the format `{variable.name}`.

#### User Variables

| Variable               | Description                        | Example Output                   |
| ---------------------- | ---------------------------------- | -------------------------------- |
| `{user.id}`            | User's Discord ID                  | `123456789012345678`             |
| `{user.name}`          | User's username                    | `john_doe`                       |
| `{user.nick}`          | User's server nickname             | `Johnny`                         |
| `{user.display}`       | Display name (nick or username)    | `Johnny`                         |
| `{user.mention}`       | Mentionable user tag               | `@john_doe`                      |
| `{user.discriminator}` | User's discriminator (legacy)      | `1234`                           |
| `{user.avatar}`        | User's avatar URL                  | `https://cdn.discordapp.com/...` |
| `{user.guild.avatar}`  | User's server-specific avatar      | `https://cdn.discordapp.com/...` |
| `{user.joined_at}`     | Unix timestamp of join date        | `1699564800`                     |
| `{user.created_at}`    | Unix timestamp of account creation | `1620000000`                     |

#### Server Variables

| Variable             | Description                       | Example Output                   |
| -------------------- | --------------------------------- | -------------------------------- |
| `{guild.id}`         | Server's Discord ID               | `987654321098765432`             |
| `{guild.name}`       | Server's name                     | `7luxor Community`               |
| `{guild.icon}`       | Server's icon URL                 | `https://cdn.discordapp.com/...` |
| `{guild.created_at}` | Unix timestamp of server creation | `1610000000`                     |
| `{guild.count}`      | Total member count                | `1337`                           |

#### Variable Usage Example

```
$v{title: Welcome, {user.display}!}
$v{description: Thanks for joining **{guild.name}**!\nYou are member #{guild.count}}
$v{thumbnail: {user.avatar}}
```

***

### Notes

* Separate each part with `$v`
* Wrap individual items with `{}`
* Supported button styles: `blue`, `green`, `red`, `grey`
* Supports variables like `{user.name}`, `{guild.name}`, etc.

### Example Full Embed

```
{content: Hey {user.mention}, welcome!}
$v
{title: Welcome to {guild.name}}
$v
{description: You’re the {guild.count}th member!}
$v
{color: #43B581}
$v
{field: name: Account Created && value: <t:{user.created_at}:R> && inline}
$v
{field: name: Joined Server && value: <t:{user.joined_at}:R> && inline}
$v
{button: label: Visit Our Website && style: blue && url: https://example.com}
$v
${delete: 20}
```

***

Use this format in any supported command like `embed`


---

# 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.7lxr.xyz/creating-custom-embeds-with-7luxor.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.
