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

  1. Automatically configure the jail system: ;jail setup

  2. (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 the endTime of 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 by jail 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 setup fails → The bot needs Manage Roles and Manage Channels permissions to create and configure the necessary roles and channels.

  • User is not restricted in other channels → The jail setup process attempts to deny View Channel and Send Messages permissions 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.

  • ;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?