đĨ Role Settings
Configure role-based access control to manage who can perform different actions in your TKI Auth system.
Configuration Overviewâ
Roles:
ClientRole: "1354369854840242267"
ListProducts: ["1354369579144445972"]
CreateProduct: ["1354369530364825600"]
DeleteProduct: ["1354369530364825600"]
# ... more role configurations
Role Categoriesâ
Client Roleâ
ClientRoleâ
Type: string
| Required: No
The role automatically assigned to users when they receive a license. Users also receive the specific product role.
ClientRole: "1354369854840242267" # Auto-assigned to license holders
ClientRole: "" # Disabled (leave blank)
Benefits:
- Automatically identifies license holders
- Provides base permissions for all customers
- Can be used for customer-only channels/features
- Simplifies permission management
Product Management Rolesâ
ListProductsâ
Type: array
| Required: Yes
Roles that can view the list of all products in the system.
ListProducts: ["1354369579144445972", "1354369530364825600"]
CreateProductâ
Type: array
| Required: Yes
Roles that can create new products in the system.
CreateProduct: ["1354369530364825600"] # Admin only
DeleteProductâ
Type: array
| Required: Yes
Roles that can delete existing products and their associated licenses.
DeleteProduct: ["1354369530364825600"] # Admin only
Deleting a product also deletes ALL associated licenses. This action cannot be undone.
ChangeVersionâ
Type: array
| Required: Yes
Roles that can modify product versions.
ChangeVersion: ["1354369530364825600"] # Admin only
License Management Rolesâ
ListLicensesâ
Type: array
| Required: Yes
Roles that can view lists of all licenses in the system.
ListLicenses: ["1354369579144445972"] # Support staff
CreateLicenseâ
Type: array
| Required: Yes
Roles that can create new licenses for products.
CreateLicense: ["1354369579144445972", "1354369530364825600"]
EditLicenseâ
Type: array
| Required: Yes
Roles that can modify existing license properties (expiry, caps, etc.).
EditLicense: ["1354369530364825600"] # Admin only
SearchLicenseâ
Type: array
| Required: Yes
Roles that can search for specific licenses by various criteria.
SearchLicense: ["1354369579144445972"] # Support staff
DeleteLicenseâ
Type: array
| Required: Yes
Roles that can delete individual licenses.
DeleteLicense: ["1354369530364825600"] # Admin only
Staff License Managementâ
CreateStaffLicenseâ
Type: array
| Required: Yes
Roles that can create staff licenses (licenses that work for all products).
CreateStaffLicense: ["1368909168320315422"] # Senior admin only
RemoveStaffLicenseâ
Type: array
| Required: Yes
Roles that can remove staff license privileges.
RemoveStaffLicense: ["1368909168320315422"] # Senior admin only
EditStaffLicenseâ
Type: array
| Required: Yes
Roles that can edit staff license properties.
EditStaffLicense: ["1368909168320315422"] # Senior admin only
Blacklist Managementâ
ListBlacklistâ
Type: array
| Required: Yes
Roles that can view blacklist entries.
ListBlacklist: ["1354369579144445972"] # Support staff
CreateBlacklistâ
Type: array
| Required: Yes
Roles that can add entries to the blacklist (IPs, HWIDs, licenses).
CreateBlacklist: ["1360995434780164156"] # Moderator level
RemoveBlacklistâ
Type: array
| Required: Yes
Roles that can remove entries from the blacklist.
RemoveBlacklist: ["1360995434780164156"] # Moderator level
Example Role Hierarchiesâ
Small Team Setupâ
Roles:
ClientRole: "123456789" # @Customer
ListProducts: ["987654321"] # @Staff
CreateProduct: ["987654321"] # @Staff
DeleteProduct: ["555666777"] # @Admin
ChangeVersion: ["555666777"] # @Admin
ListLicenses: ["987654321"] # @Staff
CreateLicense: ["987654321"] # @Staff
EditLicense: ["555666777"] # @Admin
SearchLicense: ["987654321"] # @Staff
DeleteLicense: ["555666777"] # @Admin
ListBlacklist: ["987654321"] # @Staff
CreateBlacklist: ["987654321"] # @Staff
RemoveBlacklist: ["987654321"] # @Staff
CreateStaffLicense: ["555666777"] # @Admin
RemoveStaffLicense: ["555666777"] # @Admin
EditStaffLicense: ["555666777"] # @Admin
Large Organization Setupâ
Roles:
ClientRole: "111111111" # @Customer
ListProducts: ["222222222", "333333333"] # @Support, @Manager
CreateProduct: ["333333333", "444444444"] # @Manager, @Admin
DeleteProduct: ["444444444"] # @Admin
ChangeVersion: ["333333333", "444444444"] # @Manager, @Admin
ListLicenses: ["222222222", "333333333"] # @Support, @Manager
CreateLicense: ["222222222", "333333333"] # @Support, @Manager
EditLicense: ["333333333", "444444444"] # @Manager, @Admin
SearchLicense: ["222222222", "333333333"] # @Support, @Manager
DeleteLicense: ["444444444"] # @Admin
ListBlacklist: ["222222222", "333333333"] # @Support, @Manager
CreateBlacklist: ["555555555", "333333333"] # @Moderator, @Manager
RemoveBlacklist: ["555555555", "333333333"] # @Moderator, @Manager
CreateStaffLicense: ["666666666"] # @Senior Admin
RemoveStaffLicense: ["666666666"] # @Senior Admin
EditStaffLicense: ["666666666"] # @Senior Admin
Security-Focused Setupâ
Roles:
ClientRole: "123456789"
# Read-only support
ListProducts: ["111111111"] # @Support (read-only)
ListLicenses: ["111111111"] # @Support (read-only)
SearchLicense: ["111111111"] # @Support (read-only)
ListBlacklist: ["111111111"] # @Support (read-only)
# License management
CreateLicense: ["222222222"] # @License Manager
EditLicense: ["333333333"] # @Senior Staff
DeleteLicense: ["444444444"] # @Admin
# Product management (admin only)
CreateProduct: ["444444444"] # @Admin
DeleteProduct: ["444444444"] # @Admin
ChangeVersion: ["444444444"] # @Admin
# Security features
CreateBlacklist: ["555555555"] # @Security Team
RemoveBlacklist: ["555555555"] # @Security Team
# Staff licenses (owner only)
CreateStaffLicense: ["666666666"] # @Owner
RemoveStaffLicense: ["666666666"] # @Owner
EditStaffLicense: ["666666666"] # @Owner
How to Get Role IDsâ
-
Enable Developer Mode in Discord:
- User Settings â Advanced â Developer Mode â
-
Get Role ID:
- Right-click on the role in Server Settings â Roles
- Select "Copy Role ID"
-
Alternative Method:
- Type
\@RoleName
in any channel - The message will show
<@&ROLE_ID>
- Copy the numbers after
&
- Type
Permission Strategyâ
Principle of Least Privilegeâ
- Grant only the minimum permissions needed for each role
- Regularly review and audit role permissions
- Use separate roles for different functions
Role Hierarchy Recommendationsâ
- Customer/Client - Basic access, view own licenses
- Support - View products/licenses, search capabilities
- Manager - Create/edit licenses, basic product management
- Admin - Full product management, delete capabilities
- Senior Admin - Staff license management, system configuration
Common Permission Patternsâ
Support Teamâ
# Can help customers but not modify system
ListProducts: ["support_role_id"]
ListLicenses: ["support_role_id"]
SearchLicense: ["support_role_id"]
ListBlacklist: ["support_role_id"]
License Managerâ
# Can manage licenses but not products
ListLicenses: ["license_manager_id"]
CreateLicense: ["license_manager_id"]
SearchLicense: ["license_manager_id"]
EditLicense: ["license_manager_id"]
Product Managerâ
# Can manage products and licenses
ListProducts: ["product_manager_id"]
CreateProduct: ["product_manager_id"]
ChangeVersion: ["product_manager_id"]
CreateLicense: ["product_manager_id"]
EditLicense: ["product_manager_id"]
Security Considerationsâ
Role Separationâ
- Never give all permissions to a single role
- Separate destructive actions (delete) from creative ones (create)
- Use different roles for different product lines if needed
Regular Auditsâ
- Review role assignments monthly
- Remove permissions from inactive staff
- Monitor command usage logs
Troubleshootingâ
Common Issuesâ
Commands not working:
- Verify role IDs are correct and exist
- Check that users have the required roles
- Ensure roles are properly positioned in Discord hierarchy
Permission denied errors:
- Double-check role ID format (numbers only, no spaces)
- Verify the role exists in your Discord server
- Check if the user has the role assigned
Role not being assigned:
- Verify
ClientRole
ID is correct - Check bot has "Manage Roles" permission
- Ensure bot's role is higher than the role being assigned
- Confirm the role exists in the server
Multiple roles not working:
- Each role ID must be in quotes:
["123", "456"]
- Separate role IDs with commas
- Check array syntax is correct
Testing Permissionsâ
Use these commands to test role configurations:
- Test with different users - Have team members test commands
- Check role hierarchy - Ensure bot role is positioned correctly
- Verify IDs - Double-check all role IDs are accurate
- Monitor logs - Watch for permission errors in console
Security Tipsâ
- Limit admin roles - Keep the number of full admins minimal
- Use staff licenses carefully - They bypass normal product restrictions
- Regular permission reviews - Audit roles monthly
- Backup role configs - Keep a record of your role settings