Skip to main content
These commands help tournament administrators and referees manage match schedules, including creating matches with availability checking, rescheduling, and automatic schedule generation.

/creatematchup

Creates a new match with interactive availability checking.
matchId
string
required
Unique identifier for the match (e.g., “A1”, “QF1”)
teamRed
string
required
osu! username of the red team player
teamBlue
string
required
osu! username of the blue team player
fridayDate
string
required
Reference Friday date in YYYY-MM-DD format (e.g., “2026-03-06”)
roundId
integer
required
The round ID this match belongs to

Usage Example

/creatematchup matchId:A1 teamRed:Player1 teamBlue:Player2 fridayDate:2026-03-06 roundId:1
This command provides an interactive workflow:
  1. Validates both players exist in the database
  2. Retrieves availability data for both players
  3. Displays a day selector (Friday, Saturday, Sunday, Monday)
  4. Shows hour-by-hour availability with color coding:
    • 🟢 Both players available (recommended)
    • 🔴 Only red team available
    • 🔵 Only blue team available
    • ❌ Neither player available
    • ⚠️ Time slot already has another match scheduled
  5. Creates the match in the database once time is selected
All times are displayed in Spain timezone (Europe/Madrid) but stored as UTC in the database.

/reschedulematchup

Reschedules an existing match to a new date and time.
matchId
string
required
The ID of the match to reschedule
date
string
required
New date in DD/MM format (e.g., “09/11”)
hour
string
required
New time in HH:mm format (e.g., “18:30”)

Usage Example

/reschedulematchup matchId:A1 date:09/11 hour:18:30
The time is assumed to be in UTC. The command will:
  • Validate the match exists
  • Parse the new date and time
  • Update the match’s start time in the database
This command does not check player availability. Ensure both players have confirmed the new time before rescheduling.

/removematchup

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

Usage Example

/removematchup matchId:A1
This permanently deletes the match from the database. This action cannot be undone.

/createqualifierslobby

Creates a qualifier lobby at a specific time.
roomId
string
required
Unique identifier for the qualifier lobby (e.g., “Q1”)
date
string
required
Date in DD/MM format
hour
string
required
Time in HH:mm format
roundId
integer
required
The qualifier round ID

Usage Example

/createqualifierslobby roomId:Q1 date:06/03 hour:16:00 roundId:1
Creates a pre-approved qualifier lobby. The lobby is automatically marked as approved and ready for players to join.

/removequalifiersroom

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

Usage Example

/removequalifiersroom roomId:Q1

/generate-schedules

Admin only. Automatically generates an optimized schedule for all matches in a round using constraint programming.
roundId
integer
required
The round ID to generate schedules for
fechaInicioViernes
string
required
The starting Friday date in DD/MM/YYYY format (e.g., “06/03/2026”)

Usage Example

/generate-schedules roundId:2 fechaInicioViernes:06/03/2026
This command uses Google OR-Tools constraint solver to:
  • Schedule matches across 2 weeks (Friday-Monday each week)
  • Only assign matches to times when both players are available
  • Prevent scheduling conflicts (same player in multiple matches)
  • Limit each player to 2 matches per week maximum
  • Minimize Friday and Monday matches (penalty system)
  • Distribute matches evenly across time slots
  • Handle incompatible player schedules by marking them as “limbo”
The algorithm runs for up to 30 seconds and generates:
  • A CSV file with the complete schedule
  • Visual embed showing the algorithmic cost
  • Warning if any matches couldn’t be scheduled
The algorithm considers hours 16:00-23:00 UTC+1 (Spain time) as valid scheduling windows.

/import-schedules

Admin only. Imports a modified CSV schedule file and updates the database.
roundId
integer
required
The round ID these schedules belong to
fechaInicioViernes
string
required
The reference Friday date in DD/MM/YYYY format
csvAttachment
Attachment
required
The CSV file to import (attach using Discord file upload)

Usage Example

/import-schedules roundId:2 fechaInicioViernes:06/03/2026 csvAttachment:[attach file]
CSV format:
Match ID,Semana,Día,Hora (UTC),Red Team,Blue Team
A1,1,Sábado,18:00,Player1,Player2
A2,N/A,Sin Asignar (Incompatibles),N/A,Player3,Player4
The import process:
  • Parses each row of the CSV
  • Updates match times in the database
  • Handles “limbo” matches (those marked N/A)
  • Reports statistics: updated, in limbo, and errors
You can export schedules with /generate-schedules, modify them manually, and re-import them with this command.

/generate-groups

Admin only. Generates all group stage matches for predefined groups.
roundId
integer
required
The round ID for the group stage

Usage Example

/generate-groups roundId:3
This command:
  • Uses hardcoded group assignments (Groups A-H)
  • Creates round-robin matches within each group (6 matches per 4-player group)
  • Generates match IDs in format {GroupLetter}{MatchNumber} (e.g., A1, A2, B1)
  • Inserts all matches into the database
This command uses hardcoded player IDs for a specific tournament. It needs to be modified for different tournaments.
Each 4-player group generates 6 matches:
  1. Player 1 vs Player 2
  2. Player 3 vs Player 4
  3. Player 1 vs Player 3
  4. Player 2 vs Player 4
  5. Player 1 vs Player 4
  6. Player 2 vs Player 3

Build docs developers (and LLMs) love