Jail System
The jail system allows moderators to temporarily or permanently restrict users by assigning them a "jail" role. This role typically removes all other roles and restricts access to most channels, confining them to a designated "jail" channel.
Setup
Automatically configure the jail system:
;jail setup(Optional) Manually create a role named "Jail" or "Prison" and configure its permissions.
Configuration
jailed: An internal map storing permanently jailed users, their original roles, and the jail role ID.tempjailed: An internal map storing temporarily jailed users, their original roles, the jail role ID, and theendTimeof their jail.jailRole: The role created or identified by the system that restricts jailed users.jailChannel: A dedicated channel where jailed users can communicate (optional, created byjail setup).
Common Issues:
User is jailed but still has roles → Ensure the bot's highest role is positioned above the user's highest role and the jail role.
;jail setupfails → The bot needsManage RolesandManage Channelspermissions to create and configure the necessary roles and channels.User is not restricted in other channels → The
jail setupprocess attempts to denyView ChannelandSend Messagespermissions for the jail role in all other channels. If new channels are created, permissions must be manually updated or the setup run again.Temporary jail doesn't expire → Ensure the bot is running continuously, as the expiration check runs every minute.
Usage
Jail a user:
;jail @user [reason]- Permanently jails a user.Temporarily jail a user:
;tempjail @user <duration> [reason]- Jails a user for a specified duration (e.g.,1h,30m,1d).Unjail a user:
;unjail @user [reason]- Releases a user from jail or temp jail, restoring their previous roles.View jailed users:
;jail list- Shows all users currently in jail.Check user's jail status:
;jail check @user- Displays if a user is jailed and for how long.
When a user is jailed, their original roles are removed, and they are assigned the "Jail" role. Upon release, their original roles are restored.
Related Commands
;jail- Main command for permanent jail management.;tempjail- Command for temporary jail management.;unjail- Command for releasing users from jail.
Last updated
Was this helpful?