Connecting Discord
Link your Discord server to PayBru so that membership roles are managed automatically. The setup takes about five minutes.
Prerequisites
- A PayBru creator account with at least one membership tier.
- Manage Server permission on the Discord server you want to connect.
Step 1 - Start the Connection
- Open your PayBru Creator Dashboard.
- Navigate to Settings > Integrations > Discord.
- Click Connect Discord Server.
You will be redirected to Discord's OAuth2 authorization screen.
Step 2 - Authorize the PayBru Bot
PayBru uses the Discord.Net library with a DiscordSocketClient under the hood. When you authorize, the bot requests two OAuth2 scopes:
bot- allows the bot to join your server and manage roles.applications.commands- enables slash command support.
Choose a Permission Profile
During authorization, you can select one of four permission profiles depending on your needs:
| Profile | Permissions | Best For |
|---|---|---|
| Minimal | ManageRoles, SendMessages, EmbedLinks | Creators who only need role sync |
| Moderation (default) | ManageRoles, ViewAuditLog, BanMembers, SendMessages, EmbedLinks | Most communities - includes ban sync |
| Setup | ManageRoles, ManageChannels, ViewAuditLog, BanMembers, SendMessages, EmbedLinks | Initial server setup with channel management |
| Administrator | Administrator | Full control - use only if needed |
- Select the server you want to connect from the dropdown.
- Review the permissions for your chosen profile.
- Click Authorize and complete the CAPTCHA if prompted.
If you manage multiple servers, make sure you pick the correct one from the dropdown before authorizing. The Moderation profile is recommended for most communities.
Gateway Intents
The PayBru bot uses the following gateway intents to function correctly:
- Guilds: track server structure and roles.
- GuildMembers: detect when members join or leave.
- GuildMessages: respond to commands in your server.
- MessageContent: read command arguments.
- GuildBans: sync ban lists across connected communities.
These intents are configured automatically - no action is required on your part.
Step 3 - Configure Bot Permissions
After authorization, the PayBru bot joins your server. Verify its permissions:
- Open Server Settings > Roles in Discord.
- Find the PayBru role that was created automatically.
- Confirm the following guild permissions are enabled: ManageRoles, ViewAuditLog, BanMembers, ManageChannels, SendMessages, EmbedLinks.
- Drag the PayBru role above any roles it needs to manage in the role hierarchy. Discord prevents bots from assigning roles that sit higher than their own role.
If the PayBru role is below a membership role in the hierarchy, the bot will not be able to assign that role. Always keep the PayBru role near the top of the list.
Step 4 - Confirm the Connection
Return to your PayBru dashboard. The Discord integration panel should now show your server name and a Connected status. If you see an error, double-check that:
- The bot has not been kicked from the server.
- The required permissions (ManageRoles, ViewAuditLog, BanMembers, ManageChannels, SendMessages, EmbedLinks) are still enabled.
- Your Discord account has Manage Server permission.
How Members Connect Their Discord Account
Members connect their Discord account to PayBru via OAuth2:
- The member visits their PayBru Profile > Connected Accounts.
- They click Connect Discord and authorize PayBru to read their Discord identity.
- Their Discord user ID is stored in their PayBru user claims.
- PayBru checks the member's guild membership via the Discord REST API (with a 5-minute cache) to verify they are in your server before assigning roles.
Next Steps
With the connection in place, head to Role Mapping Basics to link your PayBru membership tiers to Discord roles.