> For the complete documentation index, see [llms.txt](https://docs.iynxdev.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.iynxdev.com/configuration-files/staff-management.md).

# Staff Management

## <mark style="color:blue;">Introduction</mark>

The Staff Management configuration file (`staff_management.json`) manages staff hierarchy, role assignments, nickname formatting, and the strike system.

***

## <mark style="color:blue;">Staff Roles</mark>

**Type:** Array of Objects

Define your staff role hierarchy.

```json
staff_roles: [
    {
        'name': 'Admin',
        'id': '804354024048427009',
        'additional_roles': ['123456789012345678'],
        'sorting_role': false,
    },
    {
        'name': 'Moderator',
        'id': '804354026568155137',
        'additional_roles': [],
        'sorting_role': false,
    },
    {
        'name': 'Staff',
        'id': '804354029076348959',
        'additional_roles': [],
        'sorting_role': true,
    },
]
```

**name** - Role name used in nicknames and roster\
**id** - Discord role ID\
**additional\_roles** - Extra roles applied when promoted/demoted to this position (e.g., "Training Needed")\
**sorting\_role** - Whether this is an organizational role for grouping staff (e.g., "Management" for all admins/managers)

{% hint style="info" %}
**Sorting Roles:** Used to group staff members in activity lists. For example, "Management" might be a sorting role applied to both Managers and Admins for organization purposes.
{% endhint %}

{% hint style="warning" %}
**Important:** Include your member role at the end of the list so staff can be demoted back to regular members.
{% endhint %}

***

## <mark style="color:blue;">Manage Roles</mark>

Control how roles are applied during promotions/demotions.

### <mark style="color:yellow;">apply\_sorting\_roles</mark>

**Type:** Boolean

Whether to apply sorting roles in addition to the primary staff role.

```json
manage_roles: {
    apply_sorting_roles: true,
}
```

**When `true`:** Sorting roles are added along with the staff position role\
**When `false`:** Only the primary staff role is applied

***

### <mark style="color:yellow;">apply\_all\_possible\_sorting\_roles</mark>

**Type:** Boolean

Whether to apply all applicable sorting roles or just the highest one.

```json
apply_all_possible_sorting_roles: false
```

**When `true`:** All sorting roles the user qualifies for are applied\
**When `false`:** Only the highest applicable sorting role is applied

***

### <mark style="color:yellow;">remove\_roles\_if\_demoted</mark>

**Type:** Boolean

Whether to remove staff roles when demoting users.

```json
remove_roles_if_demoted: true
```

**When `true`:** Old staff roles are removed during demotion\
**When `false`:** Roles are kept (not recommended)

Only roles listed in `staff_roles` are removed.

***

## <mark style="color:blue;">Manage Nicknames</mark>

Automatically format staff member nicknames.

### <mark style="color:yellow;">enabled</mark>

**Type:** Boolean

Whether to auto-update nicknames.

```json
manage_nicknames: {
    enabled: true,
}
```

***

### <mark style="color:yellow;">format</mark>

**Type:** String

Nickname format template.

```json
format: "%role_name% » %user%"
```

**Placeholders:**

* `%role_name%` - Staff role name
* `%user%` - Original username

**Example Result:** `Admin » JohnDoe`

***

## <mark style="color:blue;">Sync Roster Panel</mark>

**Type:** Boolean

Auto-update roster panel when staff changes.

```json
sync_roster_panel: true
```

**When `true`:** Roster is automatically updated after promotions/demotions/resignations\
**When `false`:** Roster must be manually updated

***

## <mark style="color:blue;">DM Notification</mark>

**Type:** Boolean

Send DM notifications for staff changes.

```json
dm_notification: false
```

**When `true`:** Users receive DMs when promoted, demoted, or force-resigned\
**When `false`:** No DM notifications are sent

***

## <mark style="color:blue;">Staff Strikes</mark>

Automatic demotion system based on strikes.

### <mark style="color:yellow;">max\_strikes</mark>

**Type:** Number

Maximum strikes before automatic demotion.

```json
staff_strikes: {
    max_strikes: 3,
}
```

When a staff member reaches this number of active strikes, they are automatically demoted.

***

### <mark style="color:yellow;">demote\_to\_next\_lower\_role</mark>

**Type:** Boolean

Demotion behavior when max strikes is reached.

```json
demote_to_next_lower_role: true
```

**When `true`:** User is demoted to the next lower staff role\
**When `false`:** User is demoted directly to member role

***

## <mark style="color:blue;">Complete Configuration Example</mark>

Here's a production-ready staff management configuration:

```json
{
    config: {
        staff_roles: [
            {
                'name': 'Owner',
                'id': '804354016888750150',
                'additional_roles': [],
                'sorting_role': false,
            },
            {
                'name': 'Manager',
                'id': '804354021481381909',
                'additional_roles': [],
                'sorting_role': false,
            },
            {
                'name': 'Management',
                'id': '804354019455139900',
                'additional_roles': [],
                'sorting_role': true,
            },
            {
                'name': 'Admin',
                'id': '804354024048427009',
                'additional_roles': [],
                'sorting_role': false,
            },
            {
                'name': 'Moderator',
                'id': '804354026568155137',
                'additional_roles': [],
                'sorting_role': false,
            },
            {
                'name': 'Helper',
                'id': '804354028419022888',
                'additional_roles': ['999999999999999999'], // Training Needed role
                'sorting_role': false,
            },
            {
                'name': 'Staff',
                'id': '804354029076348959',
                'additional_roles': [],
                'sorting_role': true,
            },
            {
                'name': 'Member',
                'id': '804354037662220289',
                'additional_roles': [],
                'sorting_role': false,
            }
        ],

        manage_roles: {
            apply_sorting_roles: true,
            apply_all_possible_sorting_roles: false,
            remove_roles_if_demoted: true,
        },

        manage_nicknames: {
            enabled: true,
            format: "%role_name% » %user%",
        },

        sync_roster_panel: true,

        dm_notification: false,

        staff_strikes: {
            max_strikes: 3,
            demote_to_next_lower_role: true,
        },
    },
}
```
