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

# Embeds

> Build rich message templates once, use them everywhere.

## Overview

Petto's embeds are saved templates: build one (in Discord or on the dashboard), give it a name, then point custom commands, autoresponders, welcome/leave/boost messages, giveaway messages, or ticket panels at it by name. Change the template once and everywhere that uses it updates.

<Tip>
  The [dashboard's Embeds page](https://petto.sbs/dash) has a full visual builder: a live Discord-accurate preview, up to 10 embeds and 5 rows of link buttons per template, markdown formatting shortcuts, and a searchable [variable](/resources/scripting/variables) reference. Everything below also works from Discord directly.
</Tip>

## Creating and managing

<CodeGroup>
  ```javascript Syntax theme={null}
  !embed create <name>
  !embed preview <embed>
  !embed send <embed> [channel]
  !embed delete <embed>
  !embed list
  !embed vars [page]
  ```

  ```javascript Example theme={null}
  !embed create welcome_embed
  !embed preview welcome_embed
  !embed send welcome_embed #announcements
  ```
</CodeGroup>

<Info>
  `!embed create` opens an interactive editing panel with buttons for each field (title, description, color, fields, and so on), not a plain text reply, that's why it's the one command here without a "Result" preview.
</Info>

`vars` shows the variable reference directly in Discord, paginated.

## Editing fields

<CodeGroup>
  ```javascript Syntax theme={null}
  !embed edit title <embed> <title> [url]
  !embed edit description <embed> <description>
  !embed edit color <embed> <color>
  !embed edit author <embed> <text> [icon] [url]
  !embed edit footer <embed> <text> [icon]
  !embed edit thumbnail <embed> <image>
  !embed edit image <embed> <image>
  !embed edit timestamp <embed> <timestamp>
  ```

  ```javascript Example theme={null}
  !embed edit title welcome_embed "Welcome!" https://petto.sbs
  !embed edit color welcome_embed #8399ff
  !embed edit description welcome_embed "Glad you're here, {user}!{newline}Check #rules to get started."
  ```
</CodeGroup>

## Fields (the name/value pairs)

<CodeGroup>
  ```javascript Syntax theme={null}
  !embed field add <embed> <name> <value> [inline]
  !embed field remove <embed> <position>
  ```

  ```javascript Example theme={null}
  !embed field add welcome_embed Rules "See #rules" true
  !embed field remove welcome_embed 1
  ```
</CodeGroup>

Up to 25 fields per embed. `position` is 1-based, from the order shown in `!embed preview`.

## Using a saved embed

<AccordionGroup>
  <Accordion title="In a custom command">
    Point `!customcommand` at a saved embed instead of plain response text, `embed_template` takes priority over `response`.
  </Accordion>

  <Accordion title="In an autoresponder">
    Autoresponders support a lighter inline embed mode (color, title, footer) directly, without needing a full saved template.
  </Accordion>

  <Accordion title="In welcome/leave/boost/DM-on-join messages">
    Every `setup` subcommand (`!welcome setup`, `!leave setup`, `!boost setup`, `!dmonjoin setup`) has an `embed` option that takes priority over plain `message`.
  </Accordion>

  <Accordion title="In a ticket panel or category">
    Both `!ticket panel create` and `!ticket category add` accept a saved embed for the panel message or the ticket welcome message.
  </Accordion>
</AccordionGroup>

## Variables inside embeds

Every field (title, description, fields, author, footer, button labels) supports the full [variable](/resources/scripting/variables) list. `!embed preview` and the dashboard's live preview both show the raw, unresolved tokens, variables only resolve once the embed is actually sent by the bot.
