Skip to content

Jail

The jail command is a powerful moderation tool that isolates a member from the rest of the server. When applied, Tux removes the member's existing roles (storing them for later restoration) and assigns a specialized "Jail" role.

Typically, the Jail role is configured to deny access to all server channels except for a designated "jail" channel where the member can communicate with moderators to resolve the issue.

Syntax

The jail command can be used in two ways:

Slash Command:

Text Only
/jail member:@user [reason:STRING] [silent:true/false]

Prefix Command:

Text Only
$jail @user [reason] [-silent]

Aliases:

  • j

Parameters

Parameter Type Required Description
member Member Yes The member to jail.

Flags

This command supports the following flags:

Flag Type Default Description
reason String No reason provided The reason for the jail (positional).
-silent Boolean False If true, Tux will not attempt to DM the user.

reason

The reason for the jail, logged in the moderation case and included in the DM notification. In the prefix command, this is a positional flag. In slash commands, it is a standard argument.

  • Type: String
  • Default: "No reason provided"

-silent

Whether to suppress the DM notification to the jailed user.

  • Type: Boolean
  • Default: False
  • Aliases: -s, -quiet

Permissions

Bot Permissions

Tux requires the following permissions:

  • Manage Roles - Required to remove existing roles and add the jail role.

User Permissions

Users need appropriate moderation permissions to use this command.

Permission System

Command permissions are configured per-guild using Tux's dynamic permission system. Configure via /config commands or see the Permission Configuration guide.

Configuration

Jail behavior relies on guild-specific configuration:

  • Jail Role: The role assigned to jailed members.
  • Jail Channel: The channel jailed members are restricted to.

Admin Setup

Administrators must set up the jail_role_id and jail_channel_id using the configuration commands before this command can be used.

Usage Examples

Basic Jail (Slash)

Jailing a member for a rule violation.

Text Only
/jail member:@user reason:"Investigation into spamming"

Prefix Usage

Text Only
$jail @user Inappropriate behavior in voice chat

Response

When executed successfully, Tux will:

  1. Fetch and store the member's current manageable roles.
  2. Add the designated Jail role to the member.
  3. Remove all other manageable roles from the member.
  4. Attempt to DM the user with the jail reason (unless -silent is used).
  5. Create a new moderation case (storing role IDs for unjailing).
  6. Post a confirmation message in the current channel.
  7. Log the action in the designated moderation log channel.

Error Handling

Common Errors

Error: Missing Permissions / Higher Role

When it occurs: Tux lacks the "Manage Roles" permission, or the target user's highest role is equal to or higher than Tux's highest role.

Solution: Ensure Tux has the "Manage Roles" permission. Move the "Tux" role above the target's role in the server hierarchy.

Error: Lacking Permission Rank

When it occurs: Your internal Tux permission rank is lower than the rank required to use this command.

Solution: Contact a server administrator to check your rank.

Error: No Jail Role/Channel Found

When it occurs: The guild has not configured a jail role or channel ID in the bot's settings.

Solution: Ask a server administrator to configure these settings via Tux's configuration module.

Error: Member Already Jailed

When it occurs: The target user already has the jail role or an active jail case.

Solution: Use /unjail if you wish to release them.

  • /unjail - Restore a jailed member's roles and remove the jail restriction.
  • /timeout - A lighter alternative that doesn't involve role removal.
  • /cases - View the details of a jail case.