DWEEB
🎟️ Roles Referral Code Role setup required

Referral Code Role Template

Hand out roles with codes instead of mod work. Print QR codes on event wristbands, drop codes in a podcast or Kickstarter update, and members redeem them here for the matching role — RoleLogic supports time-limited batches and six-figure redemption counts, with an admin dashboard for minting codes.

Preview
Code RedemptionAPP

🎟️ Got a code? Redeem it here

Enter the code from your ticket, flyer, wristband or invite and the matching role lands on your account instantly.


Codes are one-per-person and some are time-limited — redeem yours early!

🎟️ Redeem a code

🛡️ Admins: create codes and QR batches in the RoleLogic dashboard.

Copy and paste the Referral Code Role text

This is the template's text as Discord markdown. Paste it into any channel and the headings, bold text, lists and subtext format exactly as they do in the preview; the card, buttons and menus come with the full template when you open it in DWEEB. Words in {braces} are DWEEB placeholders that fill in when you send from DWEEB — replace them by hand if you paste the text yourself. The Discord text formatting guide explains every piece of syntax it uses.

# 🎟️ Got a code? Redeem it here
Enter the code from your ticket, flyer, wristband or invite and the matching role lands on your account instantly.

Codes are one-per-person and some are time-limited — redeem yours early!

-# 🛡️ Admins: create codes and QR batches in the [RoleLogic dashboard](https://plugin-rolelogic.faizo.net/referral-code-role/admin?guild_id={server_id}).

When to use it

  • Granting attendee roles at IRL events via QR codes
  • Rewarding backers or podcast listeners with a code
  • Running limited-time promo roles that expire

What's inside

Built with Discord's Components V2 layout system — the accent-striped card the Discord embed builder produces in place of a legacy embed:

  • Container with accent stripe
  • Formatted text
  • Separator
  • Buttons

Tips

  • Every piece of text, colour, emoji and link is editable — open it in DWEEB and make it yours.
  • The message posts through any Discord webhook, but its Referral Code Role link only works after that service is configured for your server. DWEEB opens the required setup step when you choose the template.
  • Use the measured, high-fidelity preview to check the layout before you send.

How to use this template

  1. Open it in DWEEB. Click “Use this template free” to load the template into the visual editor — no sign-up, no install.
  2. Make it yours. Edit the text, colours, emoji, links and images to match your server. The live preview updates as you type.
  3. Finish the linked-service setup. Configure Referral Code Role for your server when DWEEB opens its setup step, then choose any Discord webhook as the destination.
  4. Send it. Review the live preview, then hit Send. You can also save it, share it as a link, schedule it, or export the message JSON.

Template JSON and compatibility

This example contains 2 top-level blocks and 7 components including nested blocks. Its text fields use 401 characters of the editor's message budget. The JSON below is exported from the same template that opens in DWEEB.

Import it through DWEEB's JSON panel, or adapt it for your own application. This is a Components V2 payload with flags: 32768, not a legacy embeds array. When executing a webhook yourself, include with_components=true in the request URL. See the Components V2 JSON reference for delivery requirements.

The link buttons depend on the linked service's server setup. Importing the JSON copies the layout and links; it does not configure that service.

Replace example text, images, links and any server placeholders before posting. Discord does not expand DWEEB placeholders when you send raw JSON from your own code. Review allowed mentions before sending text that names users or roles.

Download Referral Code Role JSON

View the complete template JSON
{
  "username": "Code Redemption",
  "components": [
    {
      "type": 17,
      "accent_color": 15105570,
      "components": [
        {
          "type": 10,
          "content": "# 🎟️ Got a code? Redeem it here\nEnter the code from your ticket, flyer, wristband or invite and the matching role lands on your account instantly."
        },
        {
          "type": 14,
          "divider": true,
          "spacing": 1
        },
        {
          "type": 10,
          "content": "Codes are one-per-person and some are time-limited — redeem yours early!"
        },
        {
          "type": 1,
          "components": [
            {
              "type": 2,
              "style": 5,
              "label": "Redeem a code",
              "emoji": {
                "name": "🎟️"
              },
              "url": "https://plugin-rolelogic.faizo.net/referral-code-role/verify?guild={server_id}"
            }
          ]
        }
      ]
    },
    {
      "type": 10,
      "content": "-# 🛡️ Admins: create codes and QR batches in the [RoleLogic dashboard](https://plugin-rolelogic.faizo.net/referral-code-role/admin?guild_id={server_id})."
    }
  ],
  "flags": 32768
}

Use this template in a bot

The same message as a discord.js or discord.py bot sends it. Both are generated from the template above by DWEEB's code generator; for a cURL, JavaScript or Python webhook request, open the template with the Code tab.

discord.js code
// Components V2 message — discord.js v14.19 or newer.
// Designed in DWEEB (https://dweeb.faizo.net). Edit the text, then send.
const {
  ActionRowBuilder,
  ButtonBuilder,
  ButtonStyle,
  ContainerBuilder,
  MessageFlags,
  SeparatorBuilder,
  SeparatorSpacingSize,
  TextDisplayBuilder,
} = require("discord.js");

const container = new ContainerBuilder()
  .setAccentColor(0xe67e22)
  .addTextDisplayComponents(
    new TextDisplayBuilder().setContent(
      [
        "# 🎟️ Got a code? Redeem it here",
        "Enter the code from your ticket, flyer, wristband or invite and the matching role lands on your account instantly.",
      ].join("\n"),
    ),
  )
  .addSeparatorComponents(
    new SeparatorBuilder().setDivider(true).setSpacing(SeparatorSpacingSize.Small),
  )
  .addTextDisplayComponents(
    new TextDisplayBuilder().setContent(
      "Codes are one-per-person and some are time-limited — redeem yours early!",
    ),
  )
  .addActionRowComponents(
    new ActionRowBuilder().addComponents(
      new ButtonBuilder()
        .setStyle(ButtonStyle.Link)
        .setLabel("Redeem a code")
        .setEmoji("🎟️")
        .setURL(
          "https://plugin-rolelogic.faizo.net/referral-code-role/verify?guild={server_id}",
        ),
    ),
  );

const text = new TextDisplayBuilder().setContent(
  "-# 🛡️ Admins: create codes and QR batches in the [RoleLogic dashboard](https://plugin-rolelogic.faizo.net/referral-code-role/admin?guild_id={server_id}).",
);

// The design also sets username "Code Redemption" — webhook-only options that
// channel.send() has no equivalent for. WebhookClient#send accepts them.

// Send it from any async context: a command handler, an event, a script.
await channel.send({
  components: [container, text],
  flags: MessageFlags.IsComponentsV2,
});
discord.py code
# Components V2 message — discord.py 2.6 or newer.
# Designed in DWEEB (https://dweeb.faizo.net). Edit the text, then send.
import discord
from discord import ui


def build_view() -> ui.LayoutView:
    view = ui.LayoutView(timeout=None)
    view.add_item(
        ui.Container(
            ui.TextDisplay(
                "# 🎟️ Got a code? Redeem it here\n"
                "Enter the code from your ticket, flyer, wristband or invite and the matching role lands on your account instantly.",
            ),
            ui.Separator(visible=True, spacing=discord.SeparatorSpacing.small),
            ui.TextDisplay(
                "Codes are one-per-person and some are time-limited — redeem yours early!",
            ),
            ui.ActionRow(
                ui.Button(
                    style=discord.ButtonStyle.link,
                    label="Redeem a code",
                    emoji="🎟️",
                    url="https://plugin-rolelogic.faizo.net/referral-code-role/verify?guild={server_id}",
                ),
            ),
            accent_colour=0xe67e22,
        ),
    )
    view.add_item(
        ui.TextDisplay(
            "-# 🛡️ Admins: create codes and QR batches in the [RoleLogic dashboard](https://plugin-rolelogic.faizo.net/referral-code-role/admin?guild_id={server_id}).",
        ),
    )
    return view


# The design also sets username "Code Redemption" — webhook-only options that
# channel.send() has no equivalent for. discord.Webhook.send accepts them.

# Send it from any coroutine: a command, an event listener, a task.
await channel.send(view=build_view())

Ready to use this template?

Open it in the visual Discord message builder, customize it for your server, and review the result before sending.

Use “Referral Code Role” →

Frequently asked questions

Do I need a bot to use this template?

You can post the message through any webhook because its button is a normal link. The linked Referral Code Role must still be configured for your server before the action behind that link works.

How do I use this Code redemption template?

Click “Use this template free” to load it into the visual editor, change the text, colours and links to fit your server, then pick a channel or paste your Discord webhook URL and hit Send. You can also share it as a single link or export the message JSON.

Is DWEEB free?

Yes. DWEEB's full visual builder is free and needs no account. Working drafts and browser saves are local by default; optional connected features such as schedules, server libraries, AI, and plugins use the data required to work.

Read next

Related templates