All posts

Give up to 3 Discord roles with one license key

One license key can give your buyers up to three Discord roles, like a buyers role, a ticket role and a customer badge, and the bot takes them back together

7 min read

Yes, one license key can give up to three Discord roles with the PWF Auth bot. Run /pwf buyer-role role:@Buyers role2:@Tickets role3:@Customer in your server, and every buyer who redeems a valid key gets all three at once. When the key expires, is banned or is deleted, the bot takes the three roles back within the hour

We added this after a developer who sells services through our Discord bot asked for it in our #suggestions channel. One role opens their ticket bot so buyers can reach them, and a second one shows the rest of the server who already bought. Until then a key gave one buyer role per app, so one role had to do both jobs. This guide shows the setup, what buyers see and what happens when a key ends, with the exact commands and answers from Discord

What is a buyer role in Discord?

A buyer role is a Discord role the bot gives a member when they redeem a valid license key in your server, and takes back when the key stops being valid. Servers use it to open buyer-only channels, a ticket bot or a VIP chat without checking anyone by hand. Each app in a server can now have up to three buyer roles, and one key gives all of them

Example roleWhat it can do in your server
@Pixel Forge buyersOpens the channels and downloads of that app
@TicketsLets the buyer open a ticket with your ticket bot
@CustomerShows in the member list who already bought

How to give up to three roles with one key

  1. Make the roles in Server Settings → Roles. Give @Tickets access to your ticket channel or ticket bot, and turn on Display role members separately from online members for the role people should see in the member list
  2. Drag the PWF Auth role above all three roles. Discord lets a bot give only the roles below its own, and the bot also needs the Manage Roles permission
  3. Run /pwf buyer-role and fill in role, role2 and role3. Discord describes them as "The role to give", "A second role to give with it" and "A third role to give with it". In a server that sells more than one app, pick the app in app:
  4. The bot answers only you with Buyer roles set

Buyer roles set · Customers get @Pixel Forge buyers, @Tickets and @Customer when they /redeem a valid key, and lose them when the key expires, is banned or deleted · Keep my PWF Auth role above these roles in Server Settings → Roles

You need the Manage Server permission to run the command. With one role the answer stays Buyer role set. /pwf buyer-role with no role at all answers Buyer role turned off: new buyers get no role, and one-time keys turn off too

The Buyer roles set answer names all three roles
The Buyer roles set answer names all three roles

What buyers see when they redeem a key

The buyer presses Redeem Key on your customer panel, pastes the key in the License key field and presses Submit. Typing /redeem key:… does the same. The bot claims the key for their Discord account and answers only them:

Key claimed · Not activated yet · 30 days from first use · You now have @Pixel Forge buyers, @Tickets and @Customer · See your keys any time with My keys

The buyer gets all three roles with one key
The buyer gets all three roles with one key

The three roles show on the buyer's member card right away. Discord lists a member under their highest role that is displayed separately, so the buyer moves into the @Pixel Forge buyers group of the member list

The member card shows the three roles, and the buyer moves into the buyers group
The member card shows the three roles, and the buyer moves into the buyers group

A key claimed by one Discord account can't be claimed by another, and every answer is private, so the key never shows up in a channel

What happens to the roles when the key ends?

WhenThe three roles
The buyer redeems a valid keyAll three are given at once
The same buyer redeems the same key againThe answer says Already yours; a role added since then is given
The key is pausedThe roles stay
The key expires, is banned or is deletedAll three are taken back within the hour
The seller renews a key that endedThe buyer redeems it again and gets the roles back
Another valid key of the buyer gives the same roleThat role stays
One-time keys are onThe key is used up and the buyer keeps the roles until the key is banned
The bot can't give a roleThe buyer is told in the answer; a one-time key stays unused

The bot checks claimed keys every hour. For each role a claim gave, it looks for another valid key of the same member in the same server that gives that role, even a key of another app there. Only roles that nothing gives anymore are taken back. That is why a shared @Customer role can stay while one product of two expires

Selling a service or access? Use one-time keys

When the roles are what you sell, turn on one-time keys for the app with /pwf one-time on:True. The bot answers:

One-time keys on · A key now works once: when it gives @Pixel Forge buyers, @Tickets and @Customer, it is used up and the customer keeps them. They can buy another key any time · Only banning the key takes them back, and a refund from your store bans it too

The buyer's answer then says Key used and "The roles stay with you. This key can't be used again", and the key shows as Redeemed in your panel. Deleting a used key doesn't take the roles back; banning it does. A used key can't sign in to a program, so leave this off when the same keys unlock your software. The rules are in one-time keys

How to check the roles of every app

/pwf status lists the roles in the Buyer roles field, next to the one-time setting and the customer panel. In a server with several apps, the More apps here field shows the roles of each other app. In your PWF Auth panel, the Discord bot page shows the same under Linked servers, for example "buyer roles: @Pixel Forge buyers, @Tickets, @Customer"

Why didn't the bot give a role?

The answer saysWhat to do
"I could not give the roles: I need the Manage Roles permission here"Turn on Manage Roles for the PWF Auth role
"I could not give the role: drag the PWF Auth role above it in Server Settings → Roles, and make sure it has Manage Roles"Move the PWF Auth role above every buyer role
Pick a real role: "@everyone cannot be a buyer role"Pick a role you made
Pick another role: "That role belongs to a bot or an integration, so nobody can hand it out"Pick a role no bot owns
Only server managers can change thisAsk someone with Manage Server

Once the permission or the role order is fixed, the buyer redeems the same key again and gets the roles that were missing

Questions developers ask

Can one license key give more than one Discord role?

Yes. With the PWF Auth bot one key gives up to three roles per app: /pwf buyer-role role:… role2:… role3:…. The buyer gets all of them when they redeem the key

How many buyer roles can one app have?

Three: role, role2 and role3. Each app in a server has its own three, and a server can sell up to 25 apps

Do the roles stay after the key expires?

No. The bot takes them back within the hour after the key expires, is banned or is deleted. A role that another valid key of the same buyer still gives stays, and with one-time keys the buyer keeps the roles until the key is banned

Can two apps give the same role?

Yes. Put the same role, for example @Customer, in the roles of both apps. It stays while any valid key of the buyer gives it

How do I go back to one role?

Run /pwf buyer-role role:@Buyers with only role. New buyers then get only that role. Buyers who already have the other two keep them until their key ends, and then the bot takes all of them back

The video at the top shows the whole flow in Discord. For several apps in one server, read Sell multiple apps in one Discord server, and if the bot is new to you, start with the Discord license bot. The full reference is the Discord bot guide

Protect your app. Start free

License keys, customer accounts and the kill switch, in every language. Make an account and sign in with your first key in a few minutes

Create a free account