A Mixton is a community-organised custom match that happens outside of the Faceit matchmaking queue. Staff set up a lobby on the web panel, assign captains, and captains take turns picking from a pool of available players sorted by ELO tier. The moment any state changes — a player joins the queue, a captain is assigned, a pick is made — the web panel updates in real time via WebSocket. All routes live inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/VasquezRivero92/Discord_Faceit/llms.txt
Use this file to discover all available pages before exploring further.
routes/lobby.js; the Discord side is powered by the /mixton_listo and /mixton_no_listo commands.
Player Queue — Discord Commands
/mixton_listo
Marks the player as available for the next Mixton. Only works for verified (linked) users — unverified players see an error pointing them to
/verificar_fc. Sets mixton_ready = true in Firestore via db.setPlayerReadyStatus() and emits a mixtonEvents.emit('update', guildId) event to trigger a WebSocket broadcast./mixton_no_listo
Removes the player from the ready queue. Sets
mixton_ready = false via db.setPlayerReadyStatus() and broadcasts the updated state. Also requires a verified account.command_mixton_listo and command_mixton_no_listo feature flags respectively. They can be toggled from the admin panel or via POST /api/lobby/mixton-toggle-command.
ELO Tiers
Players in the ready queue are automatically sorted into four tiers based on theirfaceit_level stored in Firestore:
| Tier | Faceit Levels | Notes |
|---|---|---|
| S | 10 | Highest tier; eligible for captain assignment |
| A | 8, 9 | High tier; eligible for captain assignment |
| B | 5, 6, 7 | Mid tier |
| C | 1, 2, 3, 4 | Entry tier |
faceit_elo descending. An admin can override any player’s tier via POST /api/lobby/mixton-override-tier, supplying { playerDiscordId, tier } where tier is "S", "A", "B", "C", or null (resets to automatic). The override is stored as mixton_tier_override on the user’s Firestore document.
Captains can only be assigned from Tier S or Tier A players. The
POST /api/lobby/mixton-assign-captain endpoint enforces this check and returns a 400 error if a lower-tier player is nominated.Full Draft Flow
Configure teams — POST /api/lobby/mixton-setup
An admin sends
{ numTeams } (between 2 and 6). The endpoint resets the lobby state: each team gets an ID (team_1, team_2, …), an empty captain slot, and an empty player array. The pickOrder, currentPickIndex, draftStarted, and draftFinished fields are all reset.Assign captains — POST /api/lobby/mixton-assign-captain
Send
{ teamId, discordId } for each team. The bot validates that the player is Tier S or A, resolves their Discord display details, and saves them as the team captain. A DM is sent to the captain with a link to the web panel and instructions to log in and start picking. The pickOrder array is automatically rebuilt from teams that have a captain.Set pick order — POST /api/lobby/mixton-pick-order
Send
{ pickOrder: ["team_1", "team_2", ...] } to define the snake-draft or any custom order. All teams in the array must already have captains.Start draft — POST /api/lobby/mixton-start
Validates that every team has a captain. Sets
draftStarted = true, draftFinished = false, currentPickIndex = 0, and clears any previously picked players. From this point the web panel shows each team’s empty roster slots.Captains pick — POST /api/lobby/mixton-pick
Send
{ playerDiscordId }. The endpoint checks that:- The draft is active and not finished.
- The caller is the captain of the current-turn team (or an admin).
- The player is in the ready queue (
mixton_ready === true) and not already assigned.
players array, and currentPickIndex advances to the next team in pickOrder (cycling round-robin until all slots are filled).Create match — POST /api/lobby/mixton-create-match
Once all picks are complete (
draftFinished is set to true automatically by the last mixton-pick call), an admin sends { teamIdA, teamIdB } to launch the actual match. The endpoint creates 🔊 Equipo N (Web) voice channels for each team (placed in the same category as the waiting room), moves players who are already in voice, posts a match announcement embed with Win A / Win B / Cancel buttons in DISCORD_MATCHES_CHANNEL_ID, and sends a DM to every participant with their team assignment and a link to the announcement.Real-Time WebSocket Updates
A WebSocket server listens at/api/lobby/mixton-ws. When a client connects it receives the full current lobby state immediately:
/mixton_listo command, a captain assignment, a pick, or an admin action — calls mixtonEvents.emit('update', guildId) in routes/lobby.js, which triggers broadcastLobbyState() and pushes the updated payload to every connected client whose guildId matches.
Manual Match from the Web — POST /api/lobby/create-match
Admins can skip the draft entirely and launch a 5v5 directly by supplying two arrays of exactly five Discord IDs ({ teamA, teamB }). The endpoint:
- Validates all players are verified in Firestore for the correct guild.
- Creates
🔊 Equipo A (Web)and🔊 Equipo B (Web)voice channels. - Moves players who are already in voice to their team channel.
- Posts a match announcement embed in
DISCORD_MATCHES_CHANNEL_IDwith Win A / Win B / Cancel buttons. - Sends a DM to each player with their team assignment and a link to the announcement.
- Saves the match to the active matches Firestore collection and updates the live panel.
Admin Utility Endpoints
| Endpoint | Action |
|---|---|
POST /api/lobby/mixton-override-tier | Override a player’s tier (S/A/B/C/null) |
POST /api/lobby/mixton-assign-player | Directly assign a player to a team (bypasses turn order) |
POST /api/lobby/mixton-remove-player | Remove a player from a team’s roster |
POST /api/lobby/mixton-clear-team | Empty an entire team (captain + all players) |
POST /api/lobby/mixton-reset-players | Mark all ready players as not ready |
POST /api/lobby/mixton-reset | Full lobby reset |
Alternative: /crear_sala — ELO-Balanced Room from Voice
For a quicker alternative without a web panel, any user can run /crear_sala directly in Discord. The command reads 10 players from a target voice channel (optionally specified; defaults to the caller’s channel or the waiting room) and divides them into two perfectly balanced teams using a combinatorial ELO algorithm:
- All C(10, 5) = 252 possible 5v5 splits are evaluated.
- The split with the lowest absolute ELO difference between both teams is selected.
- Two private voice channels (
🔊 Equipo A (Manual)and🔊 Equipo B (Manual)) are created and players are moved in immediately.
faceit_elo; unverified players are assigned a default ELO of 1000 and a default level of 3.