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.
/partidas gives any member a live snapshot of every Faceit match the bot is currently tracking for the guild. Matches are read directly from the faceit_active_matches Firestore collection and filtered by m.guild_id === interaction.guildId, so the list reflects only matches relevant to your server — not every match across all guilds the bot serves. The response is public and always up to date at the moment the command is run.
Syntax
Feature Flag
Guarded by thecommand_partidas feature flag scoped to the guild. When the flag is false, the bot replies with an ephemeral ❌ Este comando está desactivado por el administrador. and does not query Firestore.
Behavior
- Feature flag check — aborts early if disabled.
- Firestore query — calls
db.getActiveMatches()which retrieves all documents fromfaceit_active_matches, then filters the result to entries wherem.guild_id === interaction.guildId. - Embed construction — each active match is formatted as a description line.
- Empty state — if no matches are found after filtering, the embed shows a grey-coloured message inviting members to join the Faceit queue.
Embed Structure
When active matches exist, each entry in the embed description follows this format:- Team names are hyperlinked to the full match room URL (
https://www.faceit.com/en/cs2/room/<matchId>). - Map comes from
m.mapstored when the match was first detected. - Server location comes from
m.location(uppercased). Defaults toN/Aif not set. - Start time uses a Discord relative timestamp (
<t:unix:R>) computed fromMath.floor(m.startedAt / 1000), converting milliseconds to seconds, so it shows values like “3 minutes ago” and updates automatically in the client.
Empty State Embed
| Field | Value |
|---|---|
| Title | 🟢 Partidas de Faceit Activas |
| Description | No hay partidas activas en este momento. ¡Únete a la cola del Club en Faceit para empezar a jugar! 🎮 |
| Color | Grey (0x8C8C8C) |
Active Matches Embed
| Field | Value |
|---|---|
| Title | 🟢 Partidas de Faceit Activas |
| Description | One formatted line pair per active match |
| Color | Green (0x00FF55) |
| Footer | Sincronizado con Faceit API |
Response
The embed is sent as a public reply (ephemeral: false). interaction.deferReply() is called first so the bot has time to query Firestore before responding.
Matches appear in this list only while they have an active document in
faceit_active_matches. The bot removes documents when it receives a match-finished webhook event from Faceit, or when a manual match is resolved via the Win/Cancel buttons. Completed matches no longer appear here.Error Reference
| Condition | Error message |
|---|---|
command_partidas flag is false | ❌ Este comando está desactivado por el administrador. (ephemeral) |
| Unexpected DB or formatting error | ❌ Ocurrió un error al obtener la lista de partidas activas. |