Skip to main content

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.
The dashboard’s Embeds page 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 reference. Everything below also works from Discord directly.
The Embeds page with welcome_embed open: its preview with an embed and three buttons, the reactions, the message content and the fields of the embed

Dashboard → Design → Embeds: the visual builder, with the live preview above the fields of the message.

Creating and managing

liam runs !embed create announcement_embed and Petto answers with the panel: buttons for the title, description, color, author, footer, pictures, timestamp, fields, and Save, Reset and Cancel

In Discord: !embed create opens the editing panel of the new embed.

liam runs !embed preview welcome_embed and Petto shows the embed with liam mentioned and 1840 members

In Discord: !embed preview builds the saved embed with you as the member.

kira previews welcome and Petto says no embed has that name and how to create it

In Discord: a name that is not saved gets a hint to create it.

liam sends welcome_embed to the announcements channel and Petto confirms it

In Discord: !embed send confirms where the embed went.

The welcome embed posted by Petto in the announcements channel

In Discord: the embed as members see it in the channel.

liam deletes old_rules and Petto confirms

In Discord: !embed delete removes a saved embed.

Petto lists the five saved embeds of the server in order

In Discord: !embed list shows the saved embeds of the server.

chu runs !embed vars and Petto shows the user variables with what each one gives, page 1 of 10

In Discord: !embed vars, the first page of the variables, with buttons to turn the pages.

!embed create opens an interactive editing panel with buttons for each field (title, description, color, fields, and so on), not a plain text reply.
vars shows the variable reference directly in Discord, paginated.

Creating from one code

liam creates welcome from a code and Petto confirms it and shows the embed with the title Welcome liam

In Discord: an embed made from one code is saved and shown at once.

The whole embed can be written as one code and is saved and shown at once, without the editor panel. Blocks are joined by &v ($v is read too), && goes between the values of a block, and text before {embed} or {message: ...} is the message text. A code can hold up to 10 embeds: {embed}&v{...}&v{embed}&v{...}. A Components V2 design can also be made from a code: paste the code that starts with p2. (the one the dashboard and the Embed Builder give you) in the same place, and the design is saved and shown at once.
liam pastes a p2. code and Petto saves the rules_v2 design and shows it: the rules, a picture and the buttons I accept and petto.sbs

In Discord: a p2. code saves a Components V2 design and shows it.

The Embed code generator on the website builds a message with a preview and copies it as a one-line code. Anything unsupported is reported and left out, nothing is saved if Discord would refuse the embed, and variables such as {user} work inside values. Discord does not allow real line breaks in a command option, so write {newline}. !embed create without a code opens the editor panel as before. With the slash command, the code goes in its code option (/embed create name code:). A code with message text or buttons is saved in the dashboard’s format and is edited there. See !embed vars for the code page.
The embed code generator with a title, a description, a color and a green Accept button, its preview and the one-line code

Embed code generator (petto.sbs/embed-code): the form, the preview and the code to copy.

chu runs !embed vars 10 and Petto lists every block of an embed code with an example and the link to the generator

In Discord: the code page of !embed vars (page 10).

Sending and changing a code

An embed code works in more places than !embed create:
  • Autoresponders: write the code as the reply, !autoresponder add test, {embed}$v{description: Hi {user.mention}} --reply. See Autoresponder for the flags.
  • Changing a message Petto already sent: !editembed replaces it with a new code.
liam runs !editembed with the link of a message and a code with two embeds, and Petto confirms that it changed the message in announcements

In Discord: !editembed confirms the change with a link to the message.

The message of Petto in announcements now has two embeds, New text and A second embed

In Discord: the message after !editembed: exactly what the new code says.

It needs Manage Messages in that channel and only works on messages Petto sent. What the new code does not set is cleared, so the message becomes exactly what the code says. A message made with Components V2 cannot be changed into a normal embed message, send a new one with !embed send.
liam points !editembed at a message of kira and Petto answers in red that it can only change its own messages

In Discord: !editembed refuses a message that Petto did not send.

If a block loses its closing brace, for example {message: {user.mention}$v{description: ...}, the block ends where the next one starts and Petto tells you, instead of reading the rest of the code as text.
liam uses a code whose message block lost its brace; Petto changes the message and adds a line saying a block was closed before the next one

In Discord: a block without its closing brace: the message is changed and Petto says where the block was closed.

Buttons with actions

Besides link buttons, a code can have buttons that do something when they are clicked:
A Rules embed by Petto with a green Accept button, a blue See the rules button and a grey In private button

In Discord: the example code sent in the rules channel: three buttons with actions.

Under the rules message Petto answers Mia, only for her, that the Members role was added

In Discord: a click on Accept gives the role, and only who clicked sees the answer.

Petto shows Mia the saved rules embed with the four rules, as a message only she can see

In Discord: See the rules answers with the saved embed, only to who clicked.

Petto tells Mia, only for her, that it sent the embed to her DMs

In Discord: In private sends the embed by DM and says so.

The rules embed in a direct message from Petto

In Discord: the saved embed in the DMs of who clicked.

<role> is a mention, an ID or the name of the role. A button can have up to 4 actions (for example give a role and show an embed at once) and a code up to 5 buttons, in one row. Petto only changes roles that are below its highest role, that do not belong to an integration, and it needs the Manage Roles permission. What a button does is kept inside the button itself, so it keeps working after Petto restarts.
Buttons with actions can also be made without writing code: in the code generator and in the embed builder of the dashboard, each button can be a Link or an Action (with a color, a role or a saved embed).
The Buttons section of the editor: Accept the rules gives a role, See the rules shows a saved embed, and petto.sbs is a link

Dashboard → Design → Embeds: each button is a Link or an Action, with its color, emoji and actions.

Sending messages with !send

Only members with Manage Messages in the server can use !send (and petto send, !message send and /message send). The permission is checked first, on every way of sending, and without it Petto refuses privately. Petto also needs to see and write in the channel.
liam sends a text that mentions the Members role to announcements and Petto confirms

In Discord: !send confirms with a link to the message.

Petto's message in announcements with the Members mention and the link

In Discord: the message as Petto sent it.

liam sends a Rules embed with an Accept button to rules and Petto confirms

In Discord: an embed code with a button sent to the rules channel.

The Rules embed with the green Accept button

In Discord: the embed and its button in the channel.

Sends a message as Petto. It can be text with line breaks, links, role mentions, an embed code, and the pictures, videos or files you attach to the command (up to 10). Without a channel it is sent in the current one; if you reply to a message of that channel, the message sent replies to it too.
  • You need Manage Messages in that channel, and Petto needs to be able to write there (and Attach Files or Embed Links when needed).
  • Pings follow your permissions: people always, a role only if it can be mentioned, and @everyone or locked roles only if you have Mention Everyone.
  • Variables like {user.mention} and {server_name} are filled with you as the member.
  • A code with buttons that give or take roles needs you to have Manage Roles and those roles to be below your highest role; a button that shows an embed needs that embed to exist.
kira tries to send a button that gives the Admin role and Petto says that role is not below her highest role

In Discord: a button with a role above your own highest role is refused.

Editing fields

liam runs !embed edit title on welcome_embed, Petto says it was updated, and the preview shows the change

In Discord: !embed edit title, then !embed preview shows the new title, with its link, in the preview.

liam runs !embed edit description on welcome_embed, Petto says it was updated, and the preview shows the change

In Discord: !embed edit description, then !embed preview shows the new description, with its line break.

liam runs !embed edit color on welcome_embed, Petto says it was updated, and the preview shows the change

In Discord: !embed edit color, then !embed preview shows the new color of the side bar.

liam runs !embed edit author on welcome_embed, Petto says it was updated, and the preview shows the change

In Discord: !embed edit author, then !embed preview shows the author line with its icon.

liam runs !embed edit thumbnail on welcome_embed, Petto says it was updated, and the preview shows the change

In Discord: !embed edit thumbnail, then !embed preview shows the small picture at the top right, from {user_avatar}.

liam runs !embed edit image on welcome_embed, Petto says it was updated, and the preview shows the change

In Discord: !embed edit image, then !embed preview shows the large picture under the embed.

liam runs !embed edit timestamp on welcome_embed, Petto says it was updated, and the preview shows the change

In Discord: !embed edit timestamp, then !embed preview shows the time of the message in the footer.

Fields (the name/value pairs)

liam adds the field Rules to welcome_embed, Petto counts 2 of 25, and the preview shows both fields

In Discord: !embed field add: the second field, Rules, in the preview.

liam removes field 1 of welcome_embed and the preview no longer has the Members field

In Discord: !embed field remove 1: the first field is gone.

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

Using a saved embed

Point !customcommand at a saved embed instead of plain response text, embed_template takes priority over response.
An autoresponder can send a saved embed (--embed_template), an embed code written as its reply, or the lighter inline embed mode (color, title, footer).
Every setup subcommand (!welcome setup, !leave setup, !boost setup, !dmonjoin setup) has an embed option that takes priority over plain message. The message can also be an embed code written right there, so you set the channel and the embed (with its buttons) in one command.
Both !ticket panel create and !ticket category add accept a saved embed for the panel message or the ticket welcome message.
Several saved embeds (or embed codes) can be the pages of one message, with buttons to turn them: !pagination create #rules rules_general, then !pagination add. See Pagination.

Reactions

A saved embed can carry up to 5 reactions: emojis that Petto adds to the message when it sends it. In the dashboard editor they go in the Reactions field, separated by spaces (a custom emoji is written <:name:id>). It is the same as writing {reactreply:emoji} in the text for each one, and both can be used together. They are put on the message when it is sent with !embed send, by autoresponders and custom commands, in sticky messages, panels, partner replies, the uploads welcome and a honeypot message.
Petto's game night embed in announcements with the reactions ✅, 🤔 and ❌ already on it

In Discord: a saved embed with three reactions, sent with !embed send.

Dashboard and the Embed Builder

A message made in the dashboard can be sent to the Embed Builder with a share code, and a message sent from the Embed Builder can be opened in the dashboard to keep editing it. The dashboard can also send a test message to a channel before you save it.
The Test and share box with the channel picker, Send test, Copy share code, Copy JSON and Open in Embed Generator

Dashboard → Design → Embeds: Test and share: send a test to a channel or your DMs, copy the share code or JSON, or open it in the Embed Generator.

Embeds V2

The dashboard’s Embeds page also has a V2 editor for Discord’s Components V2 messages: containers, text, pictures, sections, dividers and rows of buttons. A V2 design is saved like any other embed and can be used in Quest alerts, sanctions, the starboard, verification and bump messages, and with !embed send and !embed preview. Its texts and links use the usual variables. Anything Discord would refuse is cleaned before it is sent.
The rules_v2 design open in the V2 editor, with its preview and the first components of the container

Dashboard → Design → Embeds: the V2 editor: the preview, then the container with its text, divider, picture and row of buttons.

A V2 design is shared with the Embed Builder with a code that starts with p2.. A button of a V2 design (in a row of buttons, or next to a section) is a link or an action. An action button has a color (blurple, green, grey or red), an optional emoji and up to four actions: give, take or toggle a role, or show a saved embed (only to who clicked, in the channel or in their DMs), the same as the buttons with actions of embed codes. A button whose roles no longer exist is left out.
liam runs !embed preview rules_v2 and Petto shows the container with the rules of Petto Land, the picture and two buttons

In Discord: a V2 design shown with !embed preview.

Text blocks of a V2 design take silent mentions too: !@Role shows the mention without notifying anyone.

Variables inside embeds

Every text of an embed (message text, title, description, fields, author, footer, button labels) and every link (URL, thumbnail, image, icons) takes the variables. Which ones have data depends on what sends the embed: a welcome fills the new member, a giveaway the {gw.*} ones, a sanction the {case.*} ones.
Example
Result (for !embed preview profile)
chu creates profile from the code and previews it: chu's name and picture, Member of Petto Land since a date, the top role Moderators and chu's ID

In Discord: the profile code, then !embed preview profile with chu as the member.

A few things to keep in mind:
  • !embed preview fills the variables with you as the member and the current channel, so you see a real result. Variables of an event (a level, a case, a giveaway) stay empty there.
  • The dashboard’s live preview fills them with sample data (a member called Liam), and a test message sent from the dashboard uses your real account.
  • Discord timestamps ({timestamp}, {gw.ends}, {case.expires}, <t:…>) are drawn in the message text, descriptions and field values. In titles, footers and author names Discord shows the raw code, so use {date} or plain words there.
  • A field whose name or value ends up empty is left out, so a field made only of a variable disappears when that variable has no data.
  • A picture link that ends up empty or isn’t a valid link is simply left out.
In the message text of an embed code and in the text of a V2 design, a ! before a mention (!@everyone, !@Role, !<@&id>, !{user.mention}) shows it without notifying anyone, and \!@everyone shows the text. In the title, description, fields and footer of an embed a mention never notifies, so the ! is only removed. See Silent mentions.