Role Mapping Basics
Role mapping tells PayBru which Discord role to assign for each membership tier. When a fan subscribes, PayBru looks up the mapping and grants the corresponding role instantly.
How It Works
| PayBru Tier | Discord Role | Access |
|---|---|---|
| Free Follower | @Follower | Public channels only |
| Supporter (R49/mo) | @Supporter | Supporter-only channels |
| VIP (R149/mo) | @VIP | All exclusive channels |
You define these mappings yourself - there are no fixed names. PayBru simply pairs each tier to the Discord role you choose.
The TierRoleMapping Entity
Behind the scenes, each mapping is stored as a TierRoleMapping record with the following fields:
| Field | Description |
|---|---|
| CommunityTierId | The PayBru membership tier being mapped. |
| DiscordRoleId | The Discord role to assign. |
| DiscordServerId | The Discord server (guild) where the role lives. |
| IsActive | Whether this mapping is currently active. |
| Priority | Determines which mapping takes precedence when multiple mappings exist. Lower numbers = higher priority. |
| RemoveOnTierLoss | Controls whether the role is removed when a member loses this tier. Defaults to true. |
Creating a Role Mapping
- Go to Creator Dashboard > Settings > Integrations > Discord.
- Under Role Mappings, click Add Mapping.
- Select a PayBru Tier from the first dropdown.
- Select the Discord Role from the second dropdown. Only roles that sit below the PayBru bot role in the hierarchy will appear.
- Set the Priority if you have multiple mappings (lower number = higher priority).
- Choose whether to enable Remove on Tier Loss (on by default - see below).
- Click Save.
Repeat for every tier you want to link.
Create the Discord roles in your server before you set up mappings. PayBru does not create roles for you - it only assigns existing ones.
Remove on Tier Loss vs. Sticky Roles
The RemoveOnTierLoss flag controls what happens when a member no longer qualifies for a tier:
- RemoveOnTierLoss = true (default): The Discord role is removed when the member loses the tier. This is the standard behavior for most membership roles.
- RemoveOnTierLoss = false ("sticky" role): The Discord role persists even after the member loses the tier. Use this for rewards you want members to keep permanently - for example, a "Founding Member" badge or an "Early Supporter" role.
Sticky roles are useful for one-time recognition. Once assigned, they stay on the member regardless of future subscription changes. To remove a sticky role, you must do so manually in Discord or deactivate the mapping.
Priority
When a member qualifies for multiple mappings, the Priority field determines which mapping is applied first. Lower numbers take precedence. This is helpful when you have overlapping tiers or want to ensure a specific role is always assigned before others.
One Tier, One Role
Each PayBru tier maps to exactly one Discord role per mapping. If a member upgrades from Supporter to VIP, PayBru removes the Supporter role (if RemoveOnTierLoss is enabled) and adds the VIP role automatically.
If you want a member to keep lower-tier roles when they upgrade (cumulative access), set RemoveOnTierLoss = false on the lower-tier mapping. Alternatively, configure your Discord channel permissions so higher roles inherit access to lower-tier channels.
Editing or Removing Mappings
- To edit a mapping, click the pencil icon next to it, change the tier, role, priority, or RemoveOnTierLoss setting, and save.
- To remove a mapping, click the trash icon. Members who already have that role will keep it until the next sync cycle (every 5 minutes) or until you manually revoke it.
Verifying Your Setup
After saving your mappings:
- Ask a test member to subscribe (or use a secondary account).
- Confirm the correct Discord role appears within a few seconds.
- Check that the member can see the channels tied to that role.
If roles are not being assigned, see Common Discord Sync Issues.