The fastest way to learn haze scripting is to read working templates and adapt them. The examples below progress from a plain text welcome message that only uses variables, through fully branded cards with colors and media, to per-button scripts with action buttons and links. Copy any example, swap in your own text and URLs, then preview it before saving.
1. Simple Welcome (Variables Only)
No layout tags — this template stays in variables-only mode and outputs interpolated plain text.
2. Branded Open Card
Adds a haze accent color, a heading, body text, a visual separator, and a link button.
3. Support Card with Thumbnail and Avatar
Uses the opener’s avatar as a section thumbnail. The {user.avatar} variable resolves to a direct image URL that {thumbnail: …} accepts.
Set a per-button welcome so the billing ticket button shows a different card from your default. First, list your buttons to get the real IDs:
The output shows each button’s label and ID:
Then set the welcome by button ID or label, followed immediately by the script template:
Do not write haze:ticket:close as a button custom ID. Discord converts :ticket: into the 🎫 emoji at the API level, so your ID becomes haze🎫close and the button will never fire correctly. Use close or haze.tickets.close instead.
5. Preview Before Saving
Always preview a script in Discord before attaching it to a ticket button or welcome setting. Pass the template directly to ,script preview:
The bot renders the full card in the current channel with your real user and guild data, so you can confirm layout, colors, and variable output before anything goes live.
Channel Name and Topic Templates
These settings use variables-only mode — no layout tags, just plain text with placeholders. Because there are no {name: value} tags, haze returns a simple interpolated string rather than building a card.
Set the ticket channel name:
Set the ticket channel topic: