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

# Autorole (Joinrole)

> Automatically assign roles to members and bots when they join your server

## Overview

The autorole system automatically assigns roles to new members when they join your server. You can configure different roles for human users and bots, making server management more efficient and ensuring proper permissions from the start.

<Info>
  Autorole supports separate configurations for humans and bots, allowing you to organize your server automatically.
</Info>

***

## Commands

<AccordionGroup>
  <Accordion title="joinrole add humans" icon="user-plus">
    Set a role to be automatically assigned to human users when they join.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~joinrole add humans <@role>
      ```

      ```bash Example theme={null}
      ~joinrole add humans @Members
      ~autorole add humans @Verified
      ~jr add humans Member
      ```
    </CodeGroup>

    **Parameters:**

    * **@role** — The role to assign (mention, ID, or name)

    **What It Does:**

    * Automatically assigns the specified role to all new human members
    * Replaces any previous human join role
    * Does not affect bots

    **Aliases:** `autorole add humans`, `jr add humans`\
    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="joinrole add bots" icon="robot">
    Set a role to be automatically assigned to bots when they join.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~joinrole add bots <@role>
      ```

      ```bash Example theme={null}
      ~joinrole add bots @Bot
      ~autorole add bots @Bots
      ~jr add bots Bot Role
      ```
    </CodeGroup>

    **Parameters:**

    * **@role** — The role to assign (mention, ID, or name)

    **What It Does:**

    * Automatically assigns the specified role to all new bots
    * Replaces any previous bot join role
    * Does not affect human members

    **Aliases:** `autorole add bots`, `jr add bots`\
    **Permissions:** Manage Server

    <Tip>
      Setting a bot role helps keep your member list organized and allows you to easily identify and manage bots.
    </Tip>
  </Accordion>

  <Accordion title="joinrole list" icon="list">
    View the current autorole configuration for your server.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~joinrole list
      ```

      ```bash Example theme={null}
      ~joinrole list
      ~autorole list
      ~jr list
      ```
    </CodeGroup>

    **What It Shows:**

    * Current role assigned to humans
    * Current role assigned to bots
    * "None" if no role is configured

    **Aliases:** `autorole list`, `jr list`\
    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="joinrole remove" icon="user-minus">
    Remove the autorole for either humans or bots.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~joinrole remove <humans|bots>
      ```

      ```bash Example theme={null}
      ~joinrole remove humans
      ~joinrole remove bots
      ~autorole remove humans
      ~jr remove bots
      ```
    </CodeGroup>

    **Parameters:**

    * **humans** — Remove autorole for human members
    * **bots** — Remove autorole for bots

    **What It Does:**

    * Disables automatic role assignment for the specified type
    * Does not affect the other type
    * Does not remove roles from existing members

    **Aliases:** `autorole remove`, `jr remove`\
    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="joinrole clear" icon="trash">
    Remove all autorole configurations (both humans and bots).

    <CodeGroup>
      ```bash Syntax theme={null}
      ~joinrole clear
      ```

      ```bash Example theme={null}
      ~joinrole clear
      ~autorole clear
      ~jr clear
      ```
    </CodeGroup>

    **What It Does:**

    * Removes autorole for both humans and bots
    * Disables the entire autorole system
    * Does not remove roles from existing members

    <Warning>
      This removes all autorole configurations. Use `joinrole remove` if you only want to remove one type.
    </Warning>

    **Aliases:** `autorole clear`, `jr clear`\
    **Permissions:** Manage Server
  </Accordion>
</AccordionGroup>

***

## How It Works

<Steps>
  <Step title="Configure Autoroles">
    Set up roles for humans and/or bots:

    ```bash theme={null}
    ~joinrole add humans @Members
    ~joinrole add bots @Bot
    ```
  </Step>

  <Step title="Verify Configuration">
    Check your settings:

    ```bash theme={null}
    ~joinrole list
    ```
  </Step>

  <Step title="Automatic Assignment">
    When new members join:

    * Human users automatically receive the configured human role
    * Bots automatically receive the configured bot role
    * Roles are assigned immediately upon joining
  </Step>
</Steps>

***

## Role Hierarchy Requirements

<Warning>
  **Bot Role Position**

  The bot must have a role positioned **higher** than the roles it's trying to assign. If the autorole is positioned above the bot's highest role, assignment will fail silently.
</Warning>

**How to Fix:**

1. Go to Server Settings → Roles
2. Ensure the bot's role is above the autorole
3. Drag roles to reorder if needed

***

## Permission Requirements

<CardGroup cols={2}>
  <Card title="Bot Permissions" icon="robot">
    The bot needs these permissions:

    * Manage Roles
    * View Audit Log (optional, for logging)
  </Card>

  <Card title="User Permissions" icon="user">
    Command Requirements:

    * **Manage Server** — Required for all joinrole commands
  </Card>
</CardGroup>

***

## Aliases

All joinrole commands support multiple aliases:

<CardGroup cols={3}>
  <Card title="joinrole" icon="user-tag">
    Full command
  </Card>

  <Card title="autorole" icon="a">
    Common alias
  </Card>

  <Card title="jr" icon="j">
    Short alias
  </Card>
</CardGroup>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Role not being assigned" icon="user-xmark">
    **Problem:** New members don't receive the autorole

    **Solutions:**

    * Verify configuration with `~joinrole list`
    * Check bot has "Manage Roles" permission
    * Ensure bot's role is higher than the autorole in role hierarchy
    * Verify the role still exists (wasn't deleted)
    * Check bot is online and functioning
  </Accordion>

  <Accordion title="Could not find that role" icon="magnifying-glass">
    **Problem:** "Could not find that role" error when setting autorole

    **Solutions:**

    * Mention the role: `@RoleName`
    * Use the role ID: `123456789012345678`
    * Type the exact role name (case-insensitive)
    * Verify the role exists in your server
  </Accordion>

  <Accordion title="Bot position too low" icon="sort">
    **Problem:** Role assignment fails due to hierarchy

    **Solution:**

    1. Go to Server Settings → Roles
    2. Drag the bot's role above the autorole
    3. Save changes
    4. Test with a new member joining
  </Accordion>

  <Accordion title="Wrong usage syntax" icon="code">
    **Problem:** "Usage: `~joinrole add humans/bots @role`" error

    **Solution:**

    * Specify type: `humans` or `bots`
    * Correct: `~joinrole add humans @Members`
    * Incorrect: `~joinrole add @Members`
  </Accordion>

  <Accordion title="Bots getting human role" icon="robot">
    **Problem:** Bots receive the human role or vice versa

    **Solution:**

    * Verify configuration with `~joinrole list`
    * Ensure you set the correct type
    * Use `~joinrole remove humans` or `~joinrole remove bots` to fix
    * Reconfigure with correct type
  </Accordion>

  <Accordion title="Removing existing roles" icon="trash">
    **Problem:** Want to remove roles from members who already joined

    **Solution:**

    * Autorole only affects new members
    * To remove from existing members, use role management:
      * Server Settings → Members
      * Select members → Manage Roles
      * Or use a bot mass role command
  </Accordion>
</AccordionGroup>

***

## Usage Examples

<Tabs>
  <Tab title="Basic Setup">
    ```bash theme={null}
    # Set up autorole for humans
    ~joinrole add humans @Members

    # Set up autorole for bots
    ~joinrole add bots @Bot

    # Check configuration
    ~joinrole list
    ```
  </Tab>

  <Tab title="Community Server">
    ```bash theme={null}
    # Give new members a starter role
    ~joinrole add humans @Newcomer

    # Separate bots into their own role
    ~joinrole add bots @Bot Account

    # Verify setup
    ~joinrole list
    ```
  </Tab>

  <Tab title="Gaming Server">
    ```bash theme={null}
    # Auto-assign gamer role
    ~joinrole add humans @Gamer

    # Mark utility bots
    ~joinrole add bots @Utility Bot

    # View current roles
    ~joinrole list
    ```
  </Tab>

  <Tab title="Changing Roles">
    ```bash theme={null}
    # Change human role
    ~joinrole add humans @Verified
    # This replaces the old role

    # Remove bot autorole
    ~joinrole remove bots

    # Check changes
    ~joinrole list
    ```
  </Tab>

  <Tab title="Management">
    ```bash theme={null}
    # View current configuration
    ~joinrole list

    # Remove humans autorole
    ~joinrole remove humans

    # Remove bots autorole
    ~joinrole remove bots

    # Or clear everything
    ~joinrole clear
    ```
  </Tab>
</Tabs>

***

## Best Practices

<Steps>
  <Step title="Use Descriptive Role Names">
    Choose clear role names like "Members", "Verified", or "Bot" so you can easily identify them.
  </Step>

  <Step title="Position Roles Correctly">
    Keep autoroles low in the hierarchy so they don't accidentally grant excessive permissions.
  </Step>

  <Step title="Separate Humans and Bots">
    Always use different roles for humans and bots to maintain organization.
  </Step>

  <Step title="Test After Setup">
    Create a test account or use an alt to verify the autorole works correctly.
  </Step>

  <Step title="Review Periodically">
    Check your autorole configuration occasionally to ensure it's still appropriate for your server.
  </Step>
</Steps>

***

## Related Features

<CardGroup cols={2}>
  <Card title="Welcome Messages" icon="hand-wave" href="/welcome">
    Greet new members with custom messages when they join
  </Card>

  <Card title="Role Management" icon="users-gear" href="/roles">
    Learn about role permissions and hierarchy management
  </Card>
</CardGroup>
