# /lock

{% hint style="info" %}
**Premium Feature** — Channel locks require a Premium subscription. [Compare plans →](https://securitybot.gitbook.io/securitybot-knowledge-hub/plans-and-pricing/plans-and-pricing)
{% endhint %}

Channel locks restrict who can send messages in a channel by requiring authentication. SecurityBot supports two lock types: **Password** and **2FA (MFA)**. When a lock is active, all messages in the channel are automatically deleted and users must authenticate via a button to unlock.

***

## Usage

| Subcommand | Options                                         | Permission | Description                                    |
| ---------- | ----------------------------------------------- | ---------- | ---------------------------------------------- |
| `create`   | `lock_type` (Choice: Password or 2FA, required) | Admin      | Create a new channel lock                      |
| `toggle`   | None                                            | Moderator+ | Toggle a channel lock on/off                   |
| `update`   | None                                            | Admin      | Update a channel lock's password               |
| `remove`   | None                                            | Admin      | Remove a channel lock from the current channel |

### Example

```
/lock create lock_type: Password
```

```
/lock toggle
```

***

## Lock Types

### Password

Users must enter the correct password to access the channel. When creating a password lock, a modal prompts you to set the password.

### 2FA (MFA)

Users must have 2FA registered and provide a valid TOTP code to access the channel. The creating user must have 2FA registered before creating an MFA lock.

{% hint style="info" %}
Discord does not support hidden input fields. Your password or 2FA code will be visible while typing -- make sure no one can see your screen.
{% endhint %}

***

## Subcommand Details

### `/lock create`

Run this command in the channel you want to lock. You will be prompted to configure the lock via a modal (password entry for password locks). For MFA locks, SecurityBot validates that you have 2FA registered first.

### `/lock toggle`

Presents an authentication modal (password or MFA code depending on lock type). Toggles the lock between active and inactive states. When inactive, normal messaging resumes.

### `/lock update`

Changes the password for a password-type lock. Presents a modal to enter the new password.

{% hint style="info" %}
Only password locks can be updated. MFA locks cannot have their configuration changed.
{% endhint %}

### `/lock remove`

Shows a confirmation embed with "Confirm" and "Cancel" buttons before permanently removing the lock from the channel.

***

## Permissions

* **`/lock create`** -- Administrator
* **`/lock toggle`** -- Moderator+
* **`/lock update`** -- Administrator
* **`/lock remove`** -- Administrator
