---
title: /recoverykey settings
description: Generate a recovery key members can use to regain access to locked commands.
---
## Overview

`/recoverykey settings` opens an interactive dashboard for generating a recovery key. Members submit this key with `/access unlock` to regain access to BetterAntiSpam commands if a command restriction locks them out.

## Required Permissions

- **Administrator** (or the server owner). Not usable in direct messages.

## Subcommands

### settings

No options. Running the command opens a dashboard with an Overview, Access, and Limits page.

## Dashboard settings

The dashboard is split into three pages: Overview, Access, and Limits.

### Overview page

- Turn the recovery key on. This generates a new key and shows it once, ephemerally, to the admin who enabled it.
- Regenerate the key at any time. This invalidates the previous key.

### Access page

Optionally choose a role. When a member successfully unlocks with `/access unlock`, BetterAntiSpam also grants them the highest staff-flavored role the bot is able to assign, in addition to lifting the command restriction.

### Limits page

- Set how many wrong guesses are allowed within a time window before BetterAntiSpam temporarily blocks further attempts (default 5 wrong guesses within 15 minutes).
- Optionally cap how many times the key can be used in total. Leave blank for unlimited uses.

## Behavior

- Recovery keys work with the `/access unlock` command. See that page for what happens when a member submits a key.
- Turning the feature off, or resetting settings, disables `/access unlock` for the server.