Skip to main content
These commands provide administrative functionality for tournament management, including match creation, schedule generation, and statistical exports.

Administrative Roles

Commands in this section require specific Discord roles:

Referee Role

Basic tournament staff permissions for match and schedule management

Admin Role

Full administrative access for automated systems and bulk operations
Role IDs are configured via environment variables: DISCORD_REFEREE_ROLE_ID and DISCORD_ADMIN_ROLE_ID

Match Management

/creatematchup

Creates a match with interactive availability checking.
This command is also documented in Scheduling Commands. It’s included here as it’s a core management function.
See the Scheduling Commands page for complete details on match creation.

/removematchup

Deletes a match from the schedule.
matchId
string
required
The ID of the match to remove

Usage Example

/removematchup matchId:A1
Referee role required. This permanently deletes the match. Ensure you have the correct match ID before executing.

/removequalifiersroom

Deletes a qualifier lobby.
roomId
string
required
The ID of the qualifier room to remove

Usage Example

/removequalifiersroom roomId:Q1

Automated Scheduling

/generate-schedules

Admin only. Uses constraint programming to automatically generate optimal schedules.
roundId
integer
required
The round to generate schedules for
fechaInicioViernes
string
required
Starting Friday date (DD/MM/YYYY format)

Usage Example

/generate-schedules roundId:2 fechaInicioViernes:06/03/2026

Algorithm Details

The schedule generator uses Google OR-Tools CP-SAT solver with these constraints: Hard Constraints:
  • Every match must be assigned exactly one time slot
  • Players can only play when both are available
  • No player can have overlapping matches
  • Maximum 2 matches per player per week
Soft Constraints (Penalty System):
  • Friday matches: +3 penalty per match
  • Monday matches: +50 penalty per match
  • Multiple matches in same slot: +20 × (count²) penalty
  • Incompatible schedules: +10,000 penalty (limbo slot)
Time Windows:
  • Days: Friday through Monday (4 days)
  • Hours: 16:00 - 23:00 (Spain timezone / UTC+1)
  • Weeks: 2 consecutive weeks
  • Total slots: 64 possible time slots + 1 limbo slot

Output

The command generates:
  • CSV File with complete schedule
  • Embed showing algorithmic cost and warnings
  • Database Updates with all match times
CSV format:
Match ID,Semana,Día,Hora (UTC),Red Team,Blue Team
A1,1,Sábado,18:00,Player1,Player2
A2,2,Domingo,19:00,Player3,Player4
Matches marked as “limbo” (N/A times) have incompatible player schedules and require manual scheduling.

/import-schedules

Admin only. Imports a modified schedule CSV back into the database.
roundId
integer
required
The round ID for these schedules
fechaInicioViernes
string
required
Reference Friday date (DD/MM/YYYY)
csvFile
Attachment
required
Modified CSV file to import

Workflow

  1. Generate initial schedule with /generate-schedules
  2. Download the CSV file
  3. Make manual adjustments (resolve limbo matches, adjust times)
  4. Upload modified CSV with /import-schedules

Usage Example

/import-schedules roundId:2 fechaInicioViernes:06/03/2026 csvFile:[attach file]

/generate-groups

Admin only. Generates all group stage matchups automatically.
roundId
integer
required
The round ID for the group stage

Usage Example

/generate-groups roundId:3

Group Structure

Creates 8 groups (A-H) with 4 players each:
  • 6 matches per group (full round-robin)
  • Total: 48 matches created
  • Match IDs: {Group}{Number} (e.g., A1, B3, H6)

Round-Robin Format

For each group with players [1, 2, 3, 4]:
  1. Match 1: Player 1 vs Player 2
  2. Match 2: Player 3 vs Player 4
  3. Match 3: Player 1 vs Player 3
  4. Match 4: Player 2 vs Player 4
  5. Match 5: Player 1 vs Player 4
  6. Match 6: Player 2 vs Player 3
Tournament-Specific: This command uses hardcoded player IDs for a specific tournament. You must modify the source code to use different groups/players.

Score Management

/importscores

Imports scores from public osu! lobbies via API. See Scoring Commands for complete documentation.

/importscores-privaterooms

Imports scores from CSV/TXT files for private lobbies. See Scoring Commands for complete documentation.

/preparescores

Admin only. Generates seeding CSV for bracket generators.
roundId
integer
required
The round to export scores for

Usage Example

/preparescores roundId:1
Generates a CSV file compatible with bracket generation tools like DIO’s bracket.json generator.

Output Format

The CSV includes:
  • Player Info: Username, osu! ID, country code
  • Scores: Raw scores for each map in the pool
  • Rankings: Per-map rankings for each player
  • Seeds: Overall seed and mod-specific seeds (NM, HD, HR, DT)
  • Team Size: Always 1 for 1v1 tournaments
Maps are ordered by:
  1. Mod type (NM → HD → HR → DT → TB)
  2. Map number within each mod
Seeds are calculated using Z-sum normalization to account for difficulty variance across maps.

/stats

Generates detailed statistical reports for qualifiers. See Scoring Commands for complete documentation.

Referee Assignment

/assignref

Assigns a referee to a match or qualifier lobby.
matchId
string
required
The match or lobby ID
refName
string
required
Display name of the referee

Usage Example

/assignref matchId:A1 refName:JohnDoe
This command:
  • Works for both elimination matches and qualifier lobbies
  • Validates referee exists in the database
  • Allows reassignment by running again with different name

/linkirc

Configures referee IRC credentials. See Referee Commands for complete documentation.

Match Environment Control

/startref

Starts a match and creates its Discord thread. See Referee Commands for complete documentation.

/endref

Ends a match and archives its thread. See Referee Commands for complete documentation.

Permission Summary

CommandRequired RoleDescription
/creatematchupRefereeCreate matches with availability checking
/removematchupRefereeDelete matches
/removequalifiersroomRefereeDelete qualifier lobbies
/assignrefRefereeAssign referees to matches
/importscoresRefereeImport scores from API
/importscores-privateroomsRefereeImport scores from files
/generate-schedulesAdminAuto-generate optimal schedules
/import-schedulesAdminImport modified schedules
/generate-groupsAdminGenerate group stage matches
/preparescoresAdminExport seeding data
/statsAdminGenerate statistical reports

Build docs developers (and LLMs) love