Skip to main content
The Script system allows you to create dynamic messages with embeds, buttons, and stickers using a simple syntax. You can also use our interactive UI at greed.best/embed to create scripts visually.
The interactive UI at greed.best/embed provides a user-friendly way to create scripts without needing to learn the syntax.

Basic Syntax

Scripts use a simple syntax with curly braces to define different components:
Each component must be on a new line for proper parsing.

Message Components

Content

The basic text content of your message:
You can use variables like to reference the user the message is being sent to.

Embeds

Create rich embeds with various components:
The color can be specified in hex format (with or without #) or as a decimal number.

Fields

Add fields to your embed:
Fields must include both a name and value, separated by &&. The inline parameter is optional.

Buttons

Add interactive buttons to your message:
Available button styles:
  • link (default)
  • primary
  • secondary
  • success
  • danger
For link buttons, you must provide a URL. Other button types require a custom_id.

Stickers

Add stickers to your message:
The sticker must exist in your server or be a standard Discord sticker.

Variables

The script system supports various variables that are automatically replaced:

User Variables

  • {user} - User’s name
  • {user.mention} - User mention
  • {user.name} - User’s username
  • {user.avatar} - User’s avatar URL
  • {user.created_at} - Account creation date
  • {user.joined_at} - Server join date

Server Variables

  • {guild.name} - Server name
  • {guild.count} - Member count
  • {guild.id} - Server ID
  • {guild.created_at} - Server creation date
  • {guild.boost_count} - Number of boosts
  • {guild.booster_count} - Number of boosters
  • {guild.boost_tier} - Server boost level
  • {guild.icon} - Server icon URL
  • {guild.vanity} - Vanity URL code
Server variables are only available when the message is being sent in a server context. You can view the rest of the variables in /resources/variables.

Examples

Welcome Message

Announcement

Error Message

Embeds have a maximum size limit. Make sure your content fits within Discord’s limits:
  • Title: 256 characters
  • Description: 4096 characters
  • Field name: 256 characters
  • Field value: 1024 characters
  • Footer text: 2048 characters
  • Total embed: 6000 characters

Best Practices

  1. Use Variables: Take advantage of the built-in variables to create dynamic content.
  2. Organize Content: Use fields to organize information in a clear, readable way.
  3. Visual Hierarchy: Use colors, titles, and formatting to create a clear visual hierarchy.
  4. Interactive Elements: Add buttons when you want users to take action.
  5. Error Handling: Always include error messages that are clear and helpful.
You can use the interactive UI at greed.best/embed to preview your scripts before using them.

Common Issues

  1. Syntax Errors: Make sure all components are properly formatted with curly braces.
  2. Missing Variables: Check that all variables exist in the current context.
  3. Size Limits: Be aware of Discord’s size limits for embeds and messages.
  4. Button Configuration: Ensure buttons have all required parameters.
Always test your scripts in a safe environment before using them in production.