Roles Configuration¶
Role assignments connect Discord roles to permission ranks, allowing Tux to determine user permissions based on their Discord roles. This guide covers how to assign, manage, and troubleshoot role-to-rank mappings.
Overview¶
Tux's permission system works by mapping Discord roles to permission ranks:
- Discord Roles: The roles users have in your server
- Permission Ranks: Numeric levels (0-10) that determine access rights
- Role Assignments: The connection between Discord roles and permission ranks
When a user has multiple roles, they get the highest permission rank among all their assigned roles.
How It Works¶
Permission Calculation¶
- User joins/has roles in Discord
- Tux looks up which permission ranks are assigned to those roles
- User gets the highest rank among all their role assignments
- Commands check if user's rank meets the required rank
Example¶
If a user has these roles:
@Moderator→ Rank 3@Event Staff→ Rank 2@Member→ Rank 0
The user gets Rank 3 permissions (the highest).
Setting Up Role Assignments¶
Using the Dashboard (Recommended)¶
- Run
/config roles(or/config role) to open the roles configuration dashboard - The dashboard shows existing role assignments and available Discord roles
- Click on a Discord role to assign it to a permission rank
- Select the desired rank from the dropdown
- The assignment appears in the dashboard
Using Commands¶
You can also manage role assignments with text commands:
Assign a role to a rank:
/config role assign 3 @Moderator
Remove a role assignment:
/config role unassign @Moderator
List all assignments:
/config role list
Default Rank Setup¶
Before assigning roles, ensure you have permission ranks set up:
- Use
/config ranks→ "🚀 Init Default Ranks" to create ranks 0-7 - Or use
/config ranks initvia command
Best Practices¶
Role Hierarchy Planning¶
- Start with defaults: Map your basic roles first
- Progressive permissions: Ensure higher ranks have more permissions
- Clear naming: Use descriptive role names that indicate their permission level
- Regular review: Audit role assignments periodically
Common Role Patterns¶
Server Owner (Rank 7) → @Server Owner
Head Admin (Rank 6) → @Head Administrator
Admin (Rank 5) → @Administrator
Senior Mod (Rank 4) → @Senior Moderator
Moderator (Rank 3) → @Moderator
Jr Mod (Rank 2) → @Junior Moderator
Trusted (Rank 1) → @Trusted Member
Member (Rank 0) → @Member (everyone starts here)
Special Considerations¶
- Bot roles: Don't assign bot roles to permission ranks unless they should have admin access
- Integration roles: Be careful with roles from bots/integrations
- Temporary roles: Consider if temporary roles (events, giveaways) need rank assignments
- Multiple assignments: One role can only be assigned to one rank, but multiple roles can have the same rank
Managing Assignments¶
Adding Assignments¶
Dashboard Method:
- Open
/config roles - Find the Discord role in the unassigned section
- Click the role and select a rank
Command Method:
/config role assign <rank_number> @RoleName
Removing Assignments¶
Dashboard Method:
- Open
/config roles - Find the assigned role
- Click the role and select "Unassign" or choose a different rank
Command Method:
/config role unassign @RoleName
Viewing Assignments¶
Dashboard Method:
- Run
/config rolesto see all current assignments
Command Method:
/config role list
Troubleshooting¶
Users Can't Access Commands¶
If users can't access commands they should have:
- Check role assignments: Use
/config role listto verify roles are assigned correctly - Verify user roles: Ensure users actually have the Discord roles assigned to ranks
- Check rank hierarchy: Users get the highest rank from all their roles
- Command permissions: Ensure commands have rank requirements set (
/config overview→ Command Permissions) - Role position: Discord role hierarchy doesn't affect permission ranks
Roles Not Appearing¶
If roles don't show in the dashboard:
- Bot permissions: Ensure the bot can see roles (needs to be in the server)
- Role visibility: Bot needs permission to view roles
- Role position: Bot's highest role must be above roles it needs to assign
- Cache issues: Try refreshing the dashboard
Permission Not Working as Expected¶
If permissions aren't working:
- Rank initialization: Ensure ranks are set up (
/config ranks) - Role assignments: Verify roles are assigned to ranks (
/config roles) - User role check: Confirm users have the expected Discord roles
- Command config: Check command permission requirements
- Bot permissions: Ensure bot has necessary Discord permissions
Multiple Role Conflicts¶
If users have conflicting permissions:
- Understand hierarchy: Users always get the highest rank from their roles
- Review assignments: Check which roles are assigned to which ranks
- Role cleanup: Remove unnecessary role assignments
- Consolidate ranks: Consider if multiple roles should have the same rank
Advanced Configuration¶
Custom Permission Ranks¶
After setting up default ranks (0-7), you can create custom ranks (8-10):
- Use
/config ranks→ "+ Create Rank" - Create specialized ranks for unique server roles
- Assign Discord roles to your custom ranks
Integration with Commands¶
Role assignments work with command permissions:
- Set command requirements in
/config overview→ Command Permissions - Users need at least the required rank to use commands
- Higher ranks automatically have access to lower-ranked commands
Audit and Monitoring¶
Regularly review your role assignments:
- Use
/config role listto see all assignments - Check for orphaned assignments (roles that no longer exist)
- Audit permission changes in server logs
- Document your role hierarchy for other admins
Related Configuration¶
- Rank Setup - Create and manage permission ranks
- Command Permissions - Set rank requirements for commands
- Permission System - Technical details