Assign Roles Command Documentation

Overview

The /assignroles command starts a new game by reading all members of a Discord role and assigning them game roles from a chosen template. It creates the game and gives you a link to the Game Setup page where you can configure players, roles, and affiliations before starting.

Moderator only: This command requires the server's configured moderator role.


/assignroles Command

Spin the wheel and assign roles to all players in a Discord role.

Required Arguments

┌───────────────┬────────┬────────────────────────────────────────────────────────┐
│ Argument      │ Type   │ Description                                            │
├───────────────┼────────┼────────────────────────────────────────────────────────┤
│ roletemplates │ Choice │ The set of roles to load into the game                 │
│ playerrole    │ Role   │ Discord role whose members become the players          │
│ modrole       │ Role   │ Discord role for moderators (excluded from the game)   │
└───────────────┴────────┴────────────────────────────────────────────────────────┘

Optional Arguments

┌────────────────┬──────┬────────────────────────────────────────────────┬─────────┐
│ Argument       │ Type │ Description                                    │ Default │
├────────────────┼──────┼────────────────────────────────────────────────┼─────────┤
│ deadplayersrole│ Role │ Discord role to assign to players when they die│ None    │
└────────────────┴──────┴────────────────────────────────────────────────┴─────────┘

Role Templates

┌──────────────────────┬───────────────────────────────────────────────────────────┐
│ Template             │ Description                                               │
├──────────────────────┼───────────────────────────────────────────────────────────┤
│ WEREWOLF             │ Werewolf default roles                                    │
│ MAFIA                │ Mafia default roles                                       │
│ SPN_3                │ Supernatural season 3 roles                               │
│ SPN_4                │ Supernatural season 4 roles                               │
│ NUTCRACKER           │ Nutcracker roles                                          │
│ BROKEN_SAFE_ZONE     │ Broken Safe Zone roles                                    │
│ SPN_MAFIA            │ Supernatural Mafia roles                                  │
│ MYTHOS_UNRAVELED     │ Mythos Unraveled roles                                    │
│ IMPORT_FROM_CHANNEL  │ Import roles from the current channel's messages          │
│ IMPORT_FROM_SERVER   │ Import roles from Discord channel categories on the server│
└──────────────────────┴───────────────────────────────────────────────────────────┘

Note: IMPORT_FROM_CHANNEL reads the messages in the channel where the command is run and parses them as role definitions. See the IMPORT_FROM_CHANNEL Feature section below for format details.

Note: IMPORT_FROM_SERVER opens an interstitial web page where you choose which channel categories to import. See the IMPORT_FROM_SERVER Feature section below for details.

Prerequisites

Restrictions

Examples

Standard Werewolf game:

/assignroles roletemplates:WEREWOLF playerrole:@Players modrole:@Moderators

Mafia game with a dead players role:

/assignroles roletemplates:MAFIA playerrole:@GameMembers modrole:@Mods deadplayersrole:@Dead

Custom roles imported from the current channel:

/assignroles roletemplates:IMPORT_FROM_CHANNEL playerrole:@Players modrole:@Moderators

What Happens When You Run /assignroles

  1. Permissions are checked — the bot verifies it has the necessary Discord permissions and that you have the moderator role.
  2. Existing game check — if a game is already active, the command stops and tells you to run /cleanupgame first.
  3. Previous game data is cleared — all stored game data and active message monitoring triggers for the server are reset.
  4. Players are collected — all Discord members with the playerrole are fetched and sorted alphabetically.
  5. Roles are loaded — either from the chosen built-in template, parsed from the channel (for IMPORT_FROM_CHANNEL), or selected via the category picker interstitial (for IMPORT_FROM_SERVER).
  6. Game is created — the bot creates the game on the server and sets up private player channels.
  7. Game Setup link is returned — a private (ephemeral) response gives you a link to the Game Setup page where you can configure and start the game.

Note: The response is only visible to you (ephemeral). Open the link to configure the role assignment and spin the wheel.


IMPORT_FROM_CHANNEL Feature

When you select IMPORT_FROM_CHANNEL, the bot reads up to 2000 previous messages in the current channel and parses them as role definitions. This lets you define fully custom roles without using a built-in template.

How to Format Roles

Post one or more messages in the channel before running the command. Use markdown headers to structure your roles:

# Team Name

## Role Name

🐺 (Must be a standard emoji. Discord custom emojis are not supported.)
Role description goes here. Can span multiple lines and can include uploaded media.

## Another Role Name

Optional description.

Formatting rules:

Note: The emoji line must be a single emoji character or Discord custom emoji. If the bot cannot identify it as an emoji, the line will be treated as the start of the description instead.

Example Channel Format

Post a message like this in the channel, then run the command:

# Village

## Seer
🔮
The Seer can investigate one player each night to learn their alignment.

## Doctor
💊
The Doctor can protect one player each night from being eliminated.

## Villager
An ordinary villager with no special abilities.

# Werewolves

## Alpha Wolf
🐺
The Alpha Wolf leads the pack and chooses who to eliminate each night.

## Moon Moon
🌙
The very best wolf who ever was or will be.

Then run:

/assignroles roletemplates:IMPORT_FROM_CHANNEL playerrole:@Players modrole:@Moderators

With Images and Attachments

You can post messages that include image attachments (e.g., role art). The bot will capture a reference to the image and forward it alongside the role description when it sends role assignments to players.

Validation

If no roles are found in the channel messages, the command will fail and show this reminder about the expected format:

# Team Name       ← affiliation (H1)
## Role Name      ← role name (H2)
<emoji>           ← optional emoji on the next line
Description text  ← description follows

IMPORT_FROM_SERVER Feature

When you select IMPORT_FROM_SERVER, the bot creates the game and gives you a link to a category picker page instead of going directly to Game Setup.

How It Works

  1. Run the command — /assignroles roletemplates:IMPORT_FROM_SERVER ... creates the game and returns an ephemeral link.

  2. Open the category picker — the page lists all channel categories on your server that contain at least one text channel. Each category has a checkbox and an expandable list of its text channels.

  3. Select categories — tick the categories whose text channels should become roles. Each text channel becomes one role; the category it belongs to becomes its affiliation.

  4. Choose a channel setup mode — once you have selected at least one category, a Channel Setup section appears:

    • Create new channels — the bot copies the selected channels by name and creates fresh private role channels for players. The originals are untouched.
    • Reuse existing channels — the bot renames the existing channels and updates their permissions directly, placing players into those channels for the game.

    If fewer channels are selected than there are players, the bot must create new channels (one per player), so the reuse option is locked.

  5. Continue to Game Setup — clicking the button fetches the first 60 messages from each selected channel to populate role descriptions, then opens the standard Game Setup page with affiliations and roles pre-filled.

Note: When using IMPORT_FROM_SERVER, you must make sure you select the team channel and extra channels options that are appropriate for your game.

How Role Data Is Populated

Images and file attachments in those messages are captured as media references and forwarded to the player's private channel when the game starts, the same way IMPORT_FROM_CHANNEL handles attachments.

Example

Your server has a category called Werewolves containing channels 🐺-alpha-wolf, 🌙-moon-moon, and a category called Village containing 🔮-seer, 💊-doctor. Selecting both categories creates four roles — Alpha Wolf and Moon Moon in the Werewolves affiliation, Seer and Doctor in the Village affiliation — and uses the channel descriptions to populate each role's text.

/assignroles roletemplates:IMPORT_FROM_SERVER playerrole:@Players modrole:@Moderators

Using the Game Setup Page

After running /assignroles, open the link from the ephemeral reply. The Game Setup page lets you configure the game before starting it. The page has several sections:

Affiliations

Affiliations are the teams in the game (e.g., Village and Werewolves). The template pre-populates affiliations based on the roles it contains. You can add, remove, and configure them here.

Each affiliation has two optional toggles:

You can also add entirely new affiliations by entering a name, picking a color, and optionally enabling team chat. At least two affiliations must always exist.

Players

A read-only list of all players pulled from the playerrole Discord role, shown with their avatars, display names, and usernames. This list cannot be changed here — adjust the Discord role before running /assignroles if you need to add or remove players.

Roles Configuration

A grid of all roles from the chosen template. For each role you can:

Use the search bar at the top to filter roles by name.

Key rule: Total roles must equal total players before the Start Game button becomes active. The Game Summary section at the bottom tracks this in real time.

Custom Roles

Create one-off roles that aren't in the template. Enter a name (up to 30 characters) and an optional description (up to 200 characters), then click + Add Custom Role. The new role appears in the Roles Configuration grid and can be counted and assigned to an affiliation like any template role.

Pin Player Assignments

Guarantee specific players receive specific roles. Click + Add Pin Assignment, then choose a player and a role from the dropdowns. The role must have a count of at least 1. The bot will assign that role to that player when starting the game, and fill remaining slots randomly. Any pinned players will be listed in the game log for post-game transparency.

Note: A player can only be pinned once. Duplicate pins are flagged with a conflict warning and will block the game from starting.

Message Monitoring

Optionally enable monitoring of message edits and deletes in player and team channels during the game. When enabled:

Player Action System

Optionally enable a structured system for tracking player abilities each phase. When enabled, you can configure:

Game Summary

A live breakdown at the bottom of the page showing total players, total roles, and per-team role counts. A floating scorecard follows you as you scroll to keep these counts visible while configuring roles. The validation message tells you whether the configuration is ready:

Starting the Game

Once the Game Summary shows the configuration is valid, click Start Game. The bot will randomly assign roles to players (respecting any pinned assignments), create all configured Discord channels, and set permissions on each role and team channel. On success, the page shows a confirmation screen and you can return to Discord.


Tips and Best Practices

Player Role Setup

Dead Players Role

Template vs. Import

Starting Fresh

Managed Games

/managedgame is an alternative to /assignroles where the bot does the game bookkeeping itself. It takes the same three role arguments (playerrole, modrole and deadplayersrole, all required) and replies with a private setup link. Managed games are in limited testing and only available to allow-listed users; see the Game Utility Commands page.


/cleanupgame Command

Delete all channels created by the bot, clear all game data, and clear all shop data for the server.

Moderator only: This command requires the server's configured moderator role.

Arguments

This command takes no arguments.

How It Works

Running /cleanupgame does not delete anything immediately. Instead, it:

  1. Searches the server's audit log for channel creation events performed by the bot (up to the last 100 entries).
  2. Displays a confirmation embed listing all bot-created channels that still exist, along with their types (Text or Category), any reused channels that will be cleaned, and a reminder that shop data will be wiped.
  3. Presents a Confirm channel cleanup button.

Clicking the button performs the actual cleanup:

A results embed is shown afterward with counts of deleted channels, cleaned reused channels, and any failures.

Managed Games

If a managed game is running instead of a classic game, the confirmation embed reads Clean Up Managed Game. Confirming ends the game immediately and marks it abandoned; engine state is kept for the record, and shop data is wiped the same way.

Confirmation Timeout

The confirmation button expires 10 minutes after the command is run. If you don't click it within that window, you'll need to run /cleanupgame again.

Restrictions

Example

/cleanupgame

The bot responds with a private embed listing channels to delete. Click Confirm channel cleanup to proceed.