Permission Types
RaidBot has three permission levels:Admin Roles
Full access to all configuration and management commands
Command Roles
Access to specific commands on a per-command basis
Signup Roles
Required roles to sign up for raids
Default Permissions
By default, RaidBot uses Discord’s built-in permission system:- Manage Server permission grants access to configuration commands
- Anyone can use
/createand sign up for raids - No signup role restrictions
Admin Roles
Admin roles grant full access to all bot configuration commands including:/setchannel— Configure posting channels/settings— Configure reminders and automation/templates— Manage raid templates/permissions— Manage role permissions/raidsignup— Manual signup management
Setting Admin Roles
Use the/permissions command to configure admin roles:
- Select “Manage Admin Roles”
- Choose one or more roles from the role selector
- Confirm to save
Users with Discord’s “Manage Server” permission can configure admin roles even if they don’t have an assigned admin role.
Admin Role Storage
Admin roles are stored per-guild in the database (state.js:310-344):- Table:
admin_roles - Fields:
guild_id,role_id - Access: Multiple roles can be assigned per guild
Command Permissions
Command permissions allow you to restrict specific commands to certain roles. This is useful for:- Limiting
/createto raid leaders only - Restricting
/recurringto admins - Controlling access to
/statsexports
Setting Command Permissions
Use the/permissions command:
- Select “Manage Command Permissions”
- Choose the command from the dropdown
- Select required roles
- Confirm to save
Available Commands for Restriction
These commands support role-based restrictions (state.js:384-425):/create— Raid creation/raid— Raid management panel/recurring— Recurring raid schedules/raidsignup— Manual signup edits/raidinfo— Raid information and exports/stats— Statistics and analytics/availability— Availability tracking/poll— Time slot polling
Command Permission Storage
Command permissions are stored per-guild and per-command (state.js:384-425):- Table:
command_permissions - Fields:
guild_id,command_name,role_id - Access: Multiple roles can be assigned per command
Signup Roles
Signup roles restrict who can sign up for raids. Users must have at least one of the configured signup roles to participate.When to Use Signup Roles
- Member verification: Require a “Verified” role before signing up
- Active members only: Restrict to active raider roles
- Tier-based access: Different roles for different raid difficulties
Setting Signup Roles
Use the/permissions command:
- Select “Manage Signup Roles”
- Choose required roles from the role selector
- Confirm to save
Users need at least ONE of the configured signup roles. If multiple roles are set, having any of them grants signup access.
Signup Role Storage
Signup roles are stored per-guild (state.js:347-381):- Table:
signup_roles - Fields:
guild_id,role_id - Access: Multiple roles can be assigned per guild
Signup Enforcement
When signup roles are configured:- User clicks a signup reaction
- Bot checks if user has any of the required roles
- If missing, bot sends ephemeral message with required roles
- If present, signup proceeds normally
Permission Checks
RaidBot checks permissions in this order:Command-Specific Permissions
Some commands have built-in permission requirements:Requires Manage Server or Admin Role
/setchannel(commands/setchannel.js:48)/settings(commands/settings.js:37)/templates(commands/templates.js:26)/permissions
Respects Command Roles
/create/raid/recurring/raidsignup/raidinfo/stats
Public Access (No Restrictions)
/help/ping/changelog
Viewing Current Permissions
Use/permissions to view current configuration:
- Admin Roles: Roles with full configuration access
- Command Permissions: Per-command role requirements
- Signup Roles: Roles required to join raids
Best Practices
Least Privilege
Only grant admin roles to trusted members who need configuration access.
Clear Role Names
Use descriptive role names like “Raid Leader” instead of generic names.
Regular Audits
Periodically review permission configuration to ensure it matches your needs.
Test Changes
Test permission changes with a non-admin account to verify behavior.
Troubleshooting
User can't access command
User can't access command
- Check if the command requires admin or specific roles
- Verify the user has the required role(s)
- Ensure role is not below bot’s role in hierarchy
- Check if user has “Manage Server” permission (bypasses role checks)
User can't sign up for raids
User can't sign up for raids
- Check if signup roles are configured
- Verify the user has at least one signup role
- Ensure signup roles are assigned correctly
- Check for role hierarchy issues
Permission changes not saving
Permission changes not saving
- Ensure you have “Manage Server” or admin role
- Check database write permissions
- Look for errors in debug channel if configured
Admin role not working
Admin role not working
- Verify role is assigned to user correctly
- Check role isn’t below bot’s role
- Ensure role ID is stored in database
- Try removing and re-adding the admin role