> ## Documentation Index
> Fetch the complete documentation index at: https://hashbot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Auto Prune

> Automatically kick members who join but never acquire a role.

Auto Prune removes members who join your server and don't acquire any meaningful role within a configurable timeout. This targets parked bot accounts, abandoned joins, and users who bypass onboarding.

<Check>
  Free for all servers. Disabled by default — enable it from the dashboard or Discord commands.
</Check>

### How It Works

1. A member joins your server and enters the **prune queue**
2. If they receive a real role (not a bypass role), they're **cleared** from the queue
3. If the timeout expires with no real role, they're **automatically kicked**

Kicks are logged to your server's log channel with the member's name, avatar, and the timeout that expired.

<Info>
  Auto Prune works alongside Verification. If you use both, members must pass the verification challenge **and** acquire a role within the timeout. This provides two layers of protection against bot accounts.
</Info>

### Setting Up Auto Prune

#### From the Dashboard

<Steps>
  <Step title="Open the Dashboard">
    Go to [dashboard.hashbot.com](https://dashboard.hashbot.com) and select your server.
  </Step>

  <Step title="Navigate to Auto Prune">
    Click **Auto Prune** in the sidebar under Hashbot.
  </Step>

  <Step title="Enable">
    Toggle the switch or click **Enable Auto Prune**.
  </Step>

  <Step title="Set Timeout">
    Choose how long new members have to acquire a role. Default is **4 hours**. Range: 10 minutes to 24 hours.
  </Step>

  <Step title="Add Bypass Roles (optional)">
    If your server auto-assigns roles on join (e.g., "Unverified" or "New Member"), add them as bypass roles so they don't count as real roles.
  </Step>
</Steps>

#### From Discord

```
/settings auto-prune set-state state:enable
```

Set the timeout (in minutes):

```
/settings auto-prune timeout minutes:240
```

View current configuration:

```
/settings auto-prune status
```

### Configuration Options

| Setting          | Default | Range             | Description                                 |
| ---------------- | ------- | ----------------- | ------------------------------------------- |
| **Enabled**      | Off     | —                 | Toggle auto-prune on or off                 |
| **Timeout**      | 4 hours | 10 min – 24 hours | How long before roleless members are kicked |
| **Bypass Roles** | None    | —                 | Roles that don't count as "having a role"   |

### Bypass Roles

By default, **any** role assignment clears a member from the prune queue. Bypass roles let you exclude specific roles from this check.

**When to use bypass roles:**

* Your server auto-assigns a role on join (e.g., via a welcome bot)
* You have a "New Member" or "Unverified" role that doesn't indicate real engagement
* You use reaction roles where the initial role is cosmetic

**How it works:** If a member **only** has bypass roles, they're treated as roleless and will still be pruned. If they have **at least one non-bypass role**, they're safe.

#### Managing Bypass Roles

From the dashboard, use the **Add bypass role** dropdown on the Auto Prune page.

From Discord:

```
/settings auto-prune bypass-role action:add role:@Unverified
/settings auto-prune bypass-role action:remove role:@Unverified
/settings auto-prune bypass-role action:list
```

### Commands

| Command                                                | Description                            |
| ------------------------------------------------------ | -------------------------------------- |
| `/settings auto-prune set-state state:enable`          | Enable auto-prune                      |
| `/settings auto-prune set-state state:disable`         | Disable auto-prune and clear the queue |
| `/settings auto-prune timeout minutes:`                | Set the kick timeout (10–1440 minutes) |
| `/settings auto-prune bypass-role action:add role:`    | Add a bypass role                      |
| `/settings auto-prune bypass-role action:remove role:` | Remove a bypass role                   |
| `/settings auto-prune bypass-role action:list`         | List all bypass roles                  |
| `/settings auto-prune status`                          | View current config and pending count  |

### Frequently Asked Questions

<AccordionGroup>
  <Accordion title="What happens to members already in the server when I enable auto-prune?">
    Only members who join **after** you enable auto-prune are tracked. Existing members are not affected.
  </Accordion>

  <Accordion title="Does disabling auto-prune clear the queue?">
    Yes. Disabling auto-prune immediately clears all pending members from the queue. No one will be kicked.
  </Accordion>

  <Accordion title="What if the bot restarts?">
    The prune queue is stored in the database, so it survives bot restarts. Members won't slip through.
  </Accordion>

  <Accordion title="Can I use auto-prune with Verification?">
    Yes. They complement each other. Verification blocks automated bots at join time, while auto-prune catches accounts that pass verification but never engage further.
  </Accordion>

  <Accordion title="Does the kicked member see a reason?">
    Discord shows "Auto Prune: no role acquired within \[timeout]" as the kick reason, which is visible in the member's audit log.
  </Accordion>
</AccordionGroup>
