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

# Scripting

> Build custom embeds with misery's scripting syntax.

## How it works

An embed script is a series of parameters. Each one is wrapped in braces, uses a colon to separate the name from its content, and is joined to the next one with `$v`.

| Symbol | Purpose |
| - | - |
| `{` | Opens a parameter |
| `:` | Splits the parameter name from its content |
| `$v` | Separates one parameter from the next |
| `}` | Closes a parameter |
| `&&` | Separates the parts of a multi-part parameter |

> [!WARNING]
>
> Anywhere a command accepts both plain text and embed code, your script has to begin with `{embed}` — otherwise misery treats the whole thing as plain text.

```javascript theme={null}
,welcome add #general {embed}$v{title: welcome!}$v{description: glad you're here, {user.mention}}
```

You can use scripts in welcome and goodbye messages, auto responders, auto messages, sticky messages, invoke messages, level-up messages, bump reminders, and Last.FM mode.

## Simple parameters

These take a single value.

| Parameter | Content |
| - | - |
| `message` | Plain text sent alongside the embed |
| `title` | The embed title |
| `url` | A link for the title |
| `description` | The embed body |
| `color` | Hex code or color name |
| `image` | Large image URL |
| `thumbnail` | Small corner image URL |
| `timestamp` | No content — just `{timestamp}` |

### Colors

Hex works as `#5865f2`, `0x5865f2`, bare `5865f2`, or short `#fff`. You can also use a name: `red`, `blue`, `green`, `purple`, `orange`, `gold`, `yellow`, `white`, `black`, or any standard web color name like `hotpink`.

## Multi-part parameters

These take several values separated by `&&`.

> **Author**
>
> Name, then optionally an icon URL and a link.
>
> ```javascript Syntax theme={null}
> {author: name && icon && url}
> ```
>
> ```javascript Example theme={null}
> {author: {user.display_name} && {user.avatar}}
> ```

> **Field**
>
> Name and value, both required. Add `&& inline` to sit fields side by side.
>
> ```javascript Syntax theme={null}
> {field: name && value && inline}
> ```
>
> ```javascript Example theme={null}
> {field: joined && {user.joined_at} && inline}
> ```
>
> Up to 25 fields per embed.

> **Footer**
>
> Text, then optionally an icon URL.
>
> ```javascript Syntax theme={null}
> {footer: text && icon}
> ```
>
> ```javascript Example theme={null}
> {footer: member #{guild.count} && {guild.icon}}
> ```

> [!NOTE]
>
> Fluxer doesn't have message buttons, so there's no `button` parameter.

## Image restrictions

> [!WARNING]
>
> Images, thumbnails, and icons are only loaded from a fixed set of hosts. Anything else is silently dropped — the image simply won't appear.

Allowed hosts:

`fluxerusercontent.com` · `fluxer.app` · `last.fm` · `lastfm.freetls.fastly.net` · `lastfm-img1.akamaized.net` · `lastfm-img2.akamaized.net` · `open.spotify.com`

Links on the title and author can point anywhere.

> [!TIP]
>
> The simplest way to get a usable image link: upload it to any Fluxer channel, then copy its link.

## A full example

```javascript theme={null}
{embed}$v{message: hey {user.mention}}$v{title: welcome to {guild.name}}$v{description: you're our {user.join_position_suffix} member}$v{color: #4d5992}$v{thumbnail: {user.avatar}}$v{field: joined && {user.joined_at} && inline}$v{footer: {guild.count} members}$v{timestamp}
```

## Limits

| Element | Max |
| - | - |
| Message content | 2,000 characters |
| Title | 256 |
| Description | 4,096 |
| Author | 256 |
| Footer | 2,048 |
| Field name / value | 256 / 1,024 |
| Fields | 25 |
| Whole embed | 6,000 characters |

## Common questions

> **How do I add a line break?**
>
> Press **Shift + Enter** while typing your message in Fluxer.

> **My embed says it produces no output**
>
> misery checks scripts before saving. Usually this means every parameter was malformed — check that each one opens with `{`, closes with `}`, and that they're joined by `$v` with nothing stray in between.

> **Why didn't @everyone ping?**
>
> `@everyone` and `@here` are blocked in scripts so a nickname or variable can't sneak one in. Bump reminders are the exception — you can type `@here` into one directly if you have **Mention Everyone**.

> **Can I use \$v or } inside my text?**
>
> No. Both are structural, so a literal `$v` splits your script and a stray `}` closes the parameter early.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.