serenity
HomeCommandsStatusEmbed BuilderFAQ
  • Introduction
  • Get started
    • Welcome & Leave
      • Setting up Welcome
      • Setting up Leave
      • Setting up JoinDM
    • Moderation Setup
    • Lastfm
  • Security Setup
    • Antinuke
      • antinuke rolecreate
      • antinuke roledelete
      • antinuke editrole
      • antinuke giverole
      • antinuke channelcreate
      • antinuke channeldelete
      • antinuke kick
      • antinuke ban
      • antinuke massmention
      • antinuke newaccounts
      • antinuke spammer
      • antinuke botadd
    • Automod
      • Filter Invites
      • Filter Words
      • Filter Joins
    • Fake Permissions
  • Server Setup
    • Roles
      • Reaction Roles
      • Booster Roles
      • Button Roles
    • VoiceMaster
    • Counters
    • Tickets
    • Starboard
  • Embeds
    • Content in Embeds
      • Parameters
      • Variables
    • Writing Embed Code
    • Using Webhooks
    • Pagination
  • Miscellaneous
    • Antinuke Punishments
    • Fake Permissions
    • Donator Perks
    • Website
    • Support Server
Powered by GitBook
On this page
  • Embed Setup
  • Scripting your own Code
  • Breaking it down
  • Adding Multiple Parameters
  • Scripting by Website
  • Commands That Takes Embeds
  1. Embeds

Writing Embed Code

Here, you can learn about how to script embeds for commands that support this feature.

PreviousVariablesNextUsing Webhooks

Last updated 9 months ago

Replace [prefix] with your server's prefix.

Embed Setup

serenity now has an easier way to set up embeds! You can use the [prefix]embedsetup command to easily create an embed.

Fill in all the fields you would like.

If you have content in a field and you need to update that field, you will not lose the previous content. It will only add more. For example, if I had a title that said "hello", then pressed "Submit", then went to add a description, it would save the title and add the description.

Once you're ready, press the save button and your embed code will be generated for you!

Scripting your own Code

Obviously, you don't have to use the embed builder. You can write your own embed code. In the screenshot below, we are using an author, title, description, and footer. These parameters are parts of an embed where you will insert content. If you don't know where they go, your embed can look different than expected.

Breaking it down

Embed code is simple once you learn it. Of course, it can be a little challenging at first. That's why we're here to break this down for you.

{title: embed title}$v{description: describing some things}

These two parameters, title and description, are parameters in the embed code. Let's go over the structure and what types of content is accepted.

Embed Structure

All embed code will begin with {embed}. This is to specify that you want the content to be an embed instead of a normal message. Parameters will always begin with a left curly bracket { to start your parameter.

Now that you know what content different parameters accept, you can finish your parameter! After your left curly bracket {, you need to specify what parameter you want to use. A basic one, description, would be written like this: {description. Now, you want to finish the rest of your parameter.

To provide content to the parameter, put a colon : after the specified parameter. After that, you will provide the content type taken by that parameter. In our case, it should look like this: {description: some text goes here

Now, you need to close your parameter with a right curly bracket }.

Your result should look like {description: some text goes here}! That is what we call valid embed structure. The output would look like the following:

Congratulations! You just wrote raw embed code.

Adding Multiple Parameters

At some point, you will need to add multiple parameters to an embed. You can do this by inserting $v after your first parameter, then writing your next parameter just like you wrote your last one. Your output will look something like this:

{embed}{description: Hello}$v{title: Hi}

Using Variables in Parameters

Variables can only be used in strings.

Variables are automatically replaced strings of text that vary depending on the user and guild. Structure of variables are similar to parameters, but you don't need to add a colon anywhere. This is because variables output automated information, nothing will be set by you.

Here is an example of a variable being used in a parameter:

You can see in the image above, {guild.name} was inputted and the embed code turned that into the server's name. Variables are very simple and easy to integrate into your embed code. For a list of variables, visit the page below.

You can use[prefix]copyembed to view embed code of embeds.

Scripting by Website

Commands That Takes Embeds

If a * is added next to the command, it means the command will take raw text or an embed. All subcommands under invoke take both raw text or embeds.

  • createembed

  • editembed

  • welcome add*

  • leave add*

  • boost add*

  • level message*

  • lastfm mode*

  • pagination add

  • pagination update

  • interface

You should also know the types of content parameters accept. Refer to the page below:

Alternatively you can also create embeds with our embed builder on . Below you can see an example of how easy it is to script on the website. Just type in the input fields what you want in your embed, copy the embed code, and use it with [prefix]createembed [code] .

Parameters
Variables
serenity.wtf