Mixton Arena is the browser-based captain draft interface for organizing custom matches within your Faceit Hub. Admins configure teams, captains pick players from an ELO-tiered pool in a defined order, and the panel pushes every state change live to all open browsers via WebSocket — no page refreshes required.Documentation 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.
Access
Navigate tohttps://your-domain/ (the root path). Login requires Discord OAuth2. The server grants access to users with the admin or global_admin role and to any Discord user who is currently assigned as a captain in any active lobby. Users who are neither admins nor captains receive an access-denied page at the auth step.
After authentication, the panel calls /api/lobby/me to verify the session and loads the current lobby state for the guild. Admin users see a guild selector dropdown to switch between multiple configured servers.
Player Pool
The available player pool is displayed as four ELO-tier columns: S, A, B, and C. EachPlayer object in the pool carries:
/mixton_listo in Discord. Their tier is automatically calculated from their faceit_elo. If a player’s ELO data is unavailable or their skill level doesn’t match their displayed tier, an admin can override it (see Admin Controls below).
You can filter the visible pool by tier tab (ALL / S / A / B / C) or by typing in the search box to find a player by Faceit nickname.
Team Grid
The team grid shows all configured teams side-by-side. Each team card displays:- Team name and ID
- Assigned captain (Faceit nickname + Discord avatar)
- All picked players with their tier badge and ELO
- Average team ELO (calculated across captain + all 5 picks)
Draft Flow
Configure Teams
Use the setup panel to choose the number of teams (2–6). Click Setup to call
POST /api/lobby/mixton-setup which initializes the lobby state in Firestore with the selected team count and empty rosters.Assign Captains
For each team, click the captain slot and select a player from the pool. This calls
POST /api/lobby/mixton-assign-captain. A player assigned as captain is removed from the general pick pool for that team.Set Pick Order
Drag team rows to reorder them, or click Randomize to shuffle the pick order. When satisfied, click Save Order to persist via
POST /api/lobby/mixton-pick-order. The pickOrder array stored in the lobby state is a sequence of team IDs.Start Draft
Click Start Draft. This calls
POST /api/lobby/mixton-start which sets draftStarted: true in the lobby state. A status banner shows which team’s captain is currently picking.Captains Pick Players
Each captain sees the player pool and clicks a player card to select them. A pending-pick confirmation overlay appears before confirming the selection. Picks are submitted via
POST /api/lobby/mixton-pick. The panel advances currentPickIndex and broadcasts the updated state to all connected panels instantly via WebSocket.Admins can pick on behalf of any captain at any time during the draft.Finish Draft and Launch Match
When all picks are exhausted (
currentPickIndex >= pickOrder.length), the lobby enters draftFinished: true state and a “Draft Finalizado” banner is shown. The admin selects two teams from the Launch Match panel and clicks Launch Match, which calls POST /api/lobby/mixton-create-match with { teamIdA, teamIdB }. The bot creates the match in Discord, sends voice channels for both teams, and DMs all players.Real-Time Sync
All open Mixton Arena panels are kept in sync via a WebSocket connection at:state_update message to all connected clients whenever any lobby action modifies the state. The client updates lobbyState, availablePlayers, and commandEnabled in real time without a page refresh. If the WebSocket connection drops, the client automatically reconnects after 5 seconds.
The HTTP upgrade is handled exclusively for the /api/lobby/mixton-ws path — all other upgrade requests are rejected.
Admin Controls
Admins have access to additional controls not available to captains:| Action | API Endpoint | Description |
|---|---|---|
| Override player tier | POST /api/lobby/mixton-override-tier | Manually set a player’s tier to S/A/B/C |
| Assign player to team | POST /api/lobby/mixton-assign-player | Add a player directly to a team slot |
| Remove player from team | POST /api/lobby/mixton-remove-player | Remove a player from a team and return them to the pool |
| Clear entire team | POST /api/lobby/mixton-clear-team | Remove all players from a team, keeping its captain |
| Reset lobby | POST /api/lobby/mixton-reset | Wipe the entire lobby state and start fresh |
| Reset ready queue | POST /api/lobby/mixton-reset-players | Clear the available player pool (removes all /mixton_listo registrations) |
| Toggle command | POST /api/lobby/mixton-toggle-command | Enable or disable the /mixton_listo Discord command |
Match History Sidebar
The history sidebar fetches the last 10 mixton matches fromGET /api/lobby/matches-history and displays each match with team names, player rosters, and the match date. From any history entry you can:
- View roster — expand a team to see all player nicknames and Discord mentions.
- Load team into slot — click a team entry to open a modal prompting which current team slot to assign it to, then confirm to call
POST /api/lobby/mixton-load-teamwith the captain’s Discord ID and the rest of the roster’s Discord IDs.
Lobby State Shape
The full lobby state managed by the panel:faceit_config/mixton_lobby_<guildId> and loaded fresh on each panel connection.