Permissions & Role Tips
Role hierarchy, managed roles, and permission gotchas.
Getting permissions and role hierarchy right is critical for JSD to function correctly. This page covers the requirements and common pitfalls.
Bot role requirements
The bot's Discord role must sit above:
- The jail role
- Any roles it needs to strip from jailed members
- Any roles it needs to restore on release
If the bot role is below a target role, Discord will reject the API call. JSD handles this gracefully by logging a warning instead of failing.
Required permissions
The bot needs these Discord permissions:
| Permission | Why |
|---|---|
| Manage Roles | Strip and restore member roles, manage jail role |
| Manage Channels | Create jail categories, channels, and appeal channels |
| Ban Members | Used when staff ban from an appeal |
| View Channels | Read channel structure for setup |
| Send Messages | Post mod-log embeds, jail chat, DMs |
| Embed Links | Rich embeds in mod log and jail chat |
| Read Message History | Access context for cases |
Managed roles
Some roles cannot be stripped or restored by bots:
- Nitro boost roles: managed by Discord automatically
- Integration roles: created by bots like MEE6, Carl-bot, etc.
- Bot roles: roles belonging to other bots
When JSD encounters a managed role, it warns in the mod log instead of failing the jail. The role is simply skipped.
Deleted roles
If a role is deleted while a member is jailed, JSD skips it on release. The member gets back all surviving roles from the snapshot.
Failed DMs
JSD attempts to DM the jailed member when they are detained and released. If the DM fails (member has DMs disabled, bot is not in a shared server, etc.):
- The jail or release proceeds normally
- The failed DM is noted in the mod log embed
- No action is required from staff
Common issues
Bot cannot strip roles
- Check that the bot role is above the target roles
- Verify Manage Roles permission is granted
- Check for managed roles (Nitro, integrations)
Bot cannot create channels
- Verify Manage Channels permission
- Check that the bot role has access to the category parent
- Ensure the server has not hit the channel limit
Members see channels while jailed
- Re-run channel structure via
/setup - Verify jail role overwrites on non-JSD channels
- Check that no other role is granting access
Tips
- Use a dedicated bot role: do not combine JSD with other bot permissions
- Keep the role hierarchy clean: regularly audit role positions
- Test with a staff member: jail a willing moderator to verify the full flow
- Check
/jsd-config: the read-only summary shows the current setup at a glance