Alliances
Alliance management system for the Dark War Survival community. Commands grouped under the /alliance prefix.
Rank Hierarchy
The alliance system uses three rank levels:
- R5 — Leader (full permissions: manage members, promote/demote, transfer)
- R4 — Officer (invite/kick members, promote R1→R4)
- R1 — Member (no management permissions)
Each rank has a corresponding Discord role configured in the dashboard.
Commands
/alliance create
Creates a new alliance with a given name, tag, and color. Automatically creates a Discord role in the format [TAG] Name.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Alliance name (2–32 characters: letters, numbers, spaces, hyphens) |
| tag | string | Yes | Short tag (1–5 alphanumeric characters, e.g., KNS) |
| color | string | No | Role color in hex format (default #5865F2) |
Permissions: Server Administrator, Management Roles, or R5 in any alliance
Example: /alliance create name:Knights tag:KNS color:#E74C3C
Success: Creates alliance, Discord role [KNS] Knights, adds creator as R5, assigns role, optionally adds to Reaction Roles
Errors:
- Missing permissions
- Invalid name (disallowed characters or length)
- Invalid tag (not 1–5 alphanumeric)
- Invalid color format (not
#XXXXXX) - Alliance limit reached (default 10)
- Alliance with this name already exists
- Tag already taken by another alliance
- Bot cannot create role (missing
manage_rolespermission)
Tag Format
User enters KNS, the system stores it as [KNS] and creates role [KNS] Knights.
/alliance import
Imports an existing Discord role as an alliance without creating a new role. Scans all members who have the role and adds them to the alliance database with ranks based on R5/R4 role configuration.
| Parameter | Type | Required | Description |
|---|---|---|---|
| role | Role | Yes | Existing Discord role to import |
| name | string | Yes | Alliance name (2–32 characters) |
| tag | string | Yes | Short tag (1–5 alphanumeric characters) |
Permissions: Server Administrator or Management Roles
Example: /alliance import role:@CHF name:CHF tag:CHF
Success: Creates alliance record using the existing role, imports all members with automatic rank assignment (R5/R4 roles → R5/R4, others → R1), optionally syncs with Reaction Roles
Errors:
- Missing permissions
- Invalid name or tag
- Alliance limit reached
- Name or tag already taken
- Role already linked to another alliance
- Database error
Migration
Use this to migrate existing alliances from other bots into ArcBot. No roles are created or deleted — all existing role assignments are preserved.
/alliance delete
Deletes an alliance — removes the database record, removes the Discord role from all members, cleans up associations.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Alliance name to delete |
Permissions: Server Administrator (only)
Example: /alliance delete name:Knights
Success: Deletes alliance, role, members from database, updates Reaction Roles
Errors:
- Missing administrator permissions
- Alliance not found
- Database error
/alliance invite
Invites a user to your alliance. Adds them as R1 and assigns the Discord role.
| Parameter | Type | Required | Description |
|---|---|---|---|
| member | Member | Yes | User to invite |
Permissions: R4 or R5 in your alliance
Example: /alliance invite member:@NewPlayer
Success: Adds member as R1, assigns alliance role
Errors:
- You're not in an alliance
- Your rank is below R4
- Target is already in your alliance
- Target is in another alliance (must leave first)
- Alliance has reached member limit (default 50)
/alliance kick
Kicks a member from your alliance. Removes them from the database and removes the Discord role.
| Parameter | Type | Required | Description |
|---|---|---|---|
| member | Member | Yes | Member to kick |
Permissions: R4 or R5 in your alliance
Example: /alliance kick member:@InactivePlayer
Success: Removes member, removes role
Errors:
- You're not in an alliance
- Your rank is below R4
- Target is not in your alliance
- R4 trying to kick R4 or higher (not allowed)
- Trying to kick yourself (use
/alliance leave)
R4 Restrictions
R4 can kick only R1 members. R5 can kick everyone except themselves.
/alliance leave
Leaves your current alliance. Removes the Discord role.
| Parameter | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | — |
Permissions: Any alliance member (except R5)
Example: /alliance leave
Success: Removes you from the alliance, removes role
Errors:
- You're not in an alliance
- You're R5 — must first transfer leadership (
/alliance transfer)
/alliance promote
Promotes an alliance member from R1 to R4. Assigns the configured R4 Discord role automatically.
| Parameter | Type | Required | Description |
|---|---|---|---|
| member | string | Yes | Member to promote (autocomplete shows same-alliance members only) |
Permissions: R4 or R5 in your alliance
Example: /alliance promote member:@ActivePlayer
Success: Sets rank to R4, assigns R4 Discord role
Errors:
- You're not in an alliance
- Your rank is below R4
- Target is not in your alliance
- Target is already R4 or higher
/alliance demote
Demotes an R4 member back to R1. Removes the configured R4 Discord role automatically.
| Parameter | Type | Required | Description |
|---|---|---|---|
| member | string | Yes | Member to demote (autocomplete shows same-alliance members only) |
Permissions: R5 (leader only)
Example: /alliance demote member:@Player
Success: Sets rank to R1, removes R4 Discord role
Errors:
- You're not in an alliance
- You don't have R5 rank
- Target is not in your alliance
- Target is not R4 (only R4 can be demoted)
/alliance transfer
Transfers leadership (R5) to another alliance member. You become R4.
| Parameter | Type | Required | Description |
|---|---|---|---|
| member | string | Yes | New leader (autocomplete shows same-alliance members only) |
Permissions: R5 (current leader only)
Example: /alliance transfer member:@NewLeader
Success: Target → R5, You → R4 (atomic transaction)
Errors:
- You're not in an alliance
- You don't have R5 rank
- Trying to transfer to yourself
- Target is not in your alliance
/alliance setleader
Sets a member as the R5 leader of an alliance. If the target is in a different alliance, they are moved automatically. Any existing R5 leader in the target alliance is demoted to R4. Discord roles are synchronized for both the new leader and the demoted leader(s).
| Parameter | Type | Required | Description |
|---|---|---|---|
| member | Member | Yes | The member to set as leader |
| alliance | string | Yes | Alliance name (autocomplete) |
Permissions: Server Administrator or Management Roles
Example: /alliance setleader member:@NewLeader alliance:Knights
Success: Target → R5, previous R5(s) → R4, roles synced, logged
Errors:
- Missing permissions
- Database unavailable
- Alliance not found
- Database update failure
/alliance info
Displays alliance details: member list grouped by ranks, creation date, role.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | No | Alliance name (if empty — shows your alliance) |
Permissions: Everyone
Example: /alliance info or /alliance info name:Knights
Success: Embed with alliance data (color, date, role, member list R5→R1)
Errors:
- No name provided and you're not in any alliance
- Alliance not found
/alliance list
Displays a list of all active alliances on the server.
| Parameter | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | — |
Permissions: Everyone
Example: /alliance list
Success: Embed with alliance list (name, member count, leader)
Errors:
- No alliances on the server (info message)
Automatic Behaviors
Auto-succession
When the leader (R5) leaves the server:
- If other members exist → highest-ranked (then longest in alliance) automatically becomes R5
- If they were the only member → alliance is marked as inactive
Reaction Roles Integration
If auto_reaction_role is enabled in the configuration:
- Creating an alliance → role added to the Reaction Roles panel
- Deleting an alliance → role removed from the panel
- Adding a role via Reaction Role → automatic join to alliance as R1
- Removing a role → automatic leave from alliance
- Attempting to join a second alliance via Reaction Role → role is automatically removed (rejection)
Leaving the Server
When an alliance member leaves the server, they are automatically removed from the alliance. If they were R5, auto-succession is triggered.
Configuration
| Option | Description | Default Value |
|---|---|---|
max_alliances | Maximum number of alliances per server | 10 |
max_members | Maximum number of members per alliance | 50 |
r5_roles | Discord roles that grant R5 rank automatically | none |
r4_roles | Discord roles that grant R4 rank automatically | none |
auto_reaction_role | Integration with Reaction Roles panel | false |
reaction_role_index | RR panel index to sync with | null (first) |
auto_nick_tag | Add [TAG] prefix to member nicknames | false |
traveler_role_id | Role removed on alliance join, restored on leave | null (disabled) |
management_roles | Roles that can create/manage alliances | none |