Giveaways
Host engagement-driven giveaways with role requirements and custom prizes.
Overview
greed's giveaway system is built for high engagement. It supports buttons for easy entry, role-based requirements, and full customization of the giveaway embed.
Starting a Giveaway
Create a giveaway by specifying the duration, winner count, and the prize.
,giveaway start (duration) (winners) (prize) [--flags]
Required arguments:
(duration): How long the giveaway runs (e.g.,1h,30m,2d)(winners): Number of winners to select (1-50)(prize): Description of the prize
Available flags:
--role (role): Restrict entry to members with this role--minlevel (level): Minimum account level to enter--maxlevel (level): Maximum account level to enter--color (hex): Custom embed color (e.g.,#FF5733)--description (text): Additional giveaway details--image (url): Header image URL--thumbnail (url): Thumbnail image URL--button (label): Custom "Enter" button text--emoji (emoji): Custom emoji for the button--preset (name): Use a saved preset
All flags are optional. The giveaway will use default styling if none are provided.
Giveaway Management
Control your active giveaways with these subcommands.
Customization
Presets
Save and reuse giveaway configurations to speed up creation.
,giveaway preset save (name) [--flags]: Save current settings as a preset with all the flags fromgiveaway start.,giveaway preset list: View all saved presets.,giveaway preset delete (name): Remove a saved preset.
Custom Templates
Templates let you fully customize how the giveaway embed appears. Instead of the default format, you define the exact layout using a templating script.
The Template Lifecycle
Write a template script
Use the giveaway variables and template syntax to define your custom embed or Components V2 layout. Test locally to validate the syntax.
Set the template
Run ,giveaway template (code) and paste your template. The bot validates it against a sample giveaway, checking for syntax errors and that at least one button is present.
Confirm the template
Review the confirmation prompt. If the template produces multiple buttons, the prompt reflects that. Click the button to finalize the template.
Template takes effect immediately
All new giveaways launched after this point will use your custom template. Existing giveaways keep their original format unless edited.
View or reset the template
Run ,giveaway template with no code to see the current template. Run ,giveaway template clear or ,giveaway template none to revert to the default.
Template Variables
These variables are available in every giveaway template and substitute their current values when the giveaway renders:
| Variable | Description | Sample Value |
|---|---|---|
{prize} | The prize description | Nintendo Switch |
{description} | The giveaway description (empty if not set) | Courtesy of our partners |
{winners} | Number of winners to select | 2 |
{entries} | Current number of entries | 487 |
{host} | Mention of the giveaway creator | <@123456789012345678> |
{host.id} | User ID of the giveaway creator (no mention) | 123456789012345678 |
{ends} | Time remaining in relative format (e.g. "in 2 hours") | in 2 hours |
{ends.long} | Full date and time when giveaway ends | September 18, 2026 3:45 PM |
{ends.timestamp} | Unix timestamp of when giveaway ends | 1726696500 |
{required_role} | Mention of the required role if set; empty otherwise | <@&987654321098765432> |
{min_level} | Minimum account level required (0 if not set) | 5 |
{max_level} | Maximum account level allowed (0 if not set) | 50 |
{ended} | Whether the giveaway has finished — true or false | false |
Template Syntax
Giveaway templates use greed's script engine. Two modes are available:
Embed Mode (default)
Write a script using embed and button syntax. Variables substitute automatically. Example:
{embed}
{title: {prize} Giveaway}
{description: {entries} entries • {winners} winner{if {winners} != 1}s{/if}}
{button: label: Enter}
Components V2 Mode
Start your template with {cv2} to use a richer component system. Example:
{cv2}
{container}
{text: **{prize} Giveaway** | {entries} entries}
{text: Ends {ends}}
{button: label: Enter}
{/container}
See Embed Scripting, Components, and Variables for complete syntax documentation.
Worked Examples
A basic template using embed syntax with core variables:
{embed}
{title: 🎉 {prize} Giveaway}
{description: {entries} entries • {winners} winner(s)}
{field: Ends::{ends}}
{field: Hosted by::{host}}
{color: #5d86cf}
{button: label: Enter to Win}
Renders as:
- Title: "🎉 Nintendo Switch Giveaway"
- Description: "487 entries • 2 winners"
- Field: "Ends: in 2 hours"
- Field: "Hosted by: @ModName"
- Color: brand blue
- Single button: "Enter to Win"
Flags on giveaway start
These flags customize individual giveaways and interact with templates:
| Flag | Value | Effect | Template Interaction |
|---|---|---|---|
--role (role) | Role mention/name/ID | Restricts entry to members with this role | Template can reference via {required_role} or conditional {if {required_role}} |
--minlevel (level) | Number 0-∞ | Restricts entry to accounts at least this old | Template can reference via {min_level} |
--maxlevel (level) | Number 0-∞ | Restricts entry to accounts at most this old | Template can reference via {max_level} |
--color (hex) | Hex code (#RGB or #RRGGBB) | Overrides embed color (ignored in CV2) | CV2 templates can define their own accent colors |
--description (text) | Any text | Adds a description line under the prize | Template can reference via {description} or conditional {if {description}} |
--image (url) | HTTP(S) URL | Sets the large embed image (ignored in CV2) | CV2 templates can use {media} instead |
--thumbnail (url) | HTTP(S) URL | Sets the embed thumbnail (ignored in CV2) | CV2 templates can use {section} with {thumbnail} |
--button (label) | Any text (≤80 chars) | Custom label for the main Enter button (ignored if template present) | Only used if no template is set |
--emoji (emoji) | Unicode/custom emoji | Adds emoji to the main button (ignored if template present) | Only used if no template is set |
--preset (name) | Preset name | Applies a saved preset for color, description, image, thumbnail, button, emoji | Presets fill in defaults; direct flags override |
Flags on giveaway preset save
Presets store reusable styling. They support these flags (matching giveaway start):
--color (hex): Embed color--description (text): Description line--image (url): Large image--thumbnail (url): Thumbnail image--button (label): Button label--emoji (emoji): Button emoji
Presets are applied when you run giveaway start --preset (name). Direct flags on start override preset values.
How Presets and Templates Interact
- Template set, no preset: The template controls the entire layout. Flags like
--button,--color,--imageare ignored. - Preset set, no template: The preset provides styling defaults for the built-in embed format. You can override individual values with flags on
start. - Both set: The template takes priority. Preset values are ignored.
- Neither set: The built-in default embed format is used. Flags on
startcustomize it.
Troubleshooting
Technical Details
- Participation: Users enter by clicking the button on the giveaway message.
- Winner Selection: greed uses cryptographically secure randomization for fair winner selection.
- Duration: Giveaways must run between 10 seconds and 30 days.
- Message Reference: Use the message ID or reply to a giveaway message to reference it in edit/end/reroll commands.