TheDocumentation 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.
/verificar_fc command is the entry point for every verified member on your server. It resolves a Faceit nickname against the Faceit Data API v4, confirms the player exists and has an active CS2 or CS:GO profile, checks for duplicate links across the guild, persists the relationship in the faceit_users Firestore collection, and — when autoRoleSync is enabled — immediately assigns the matching level role (1–10) in Discord. All sensitive API failures are returned as ephemeral messages visible only to the caller.
Syntax
Parameters
Your exact Faceit username (case-insensitive lookup). Must match the nickname displayed on your Faceit profile page at
https://www.faceit.com/en/players/<nickname>.Feature Flag
This command is guarded by thecommand_verificar feature flag. When disabled, the bot replies with an ephemeral ❌ Este comando está desactivado por el administrador. and takes no further action.
Channel Restriction
The command must be run inside the configured link channel. The channel is read fromsettings.discordLinkChannelId (Firestore) with a fallback to the DISCORD_LINK_CHANNEL_ID environment variable. The value supports a comma-separated list of channel IDs, so you can allow verification in multiple channels simultaneously.
Attempting to run /verificar_fc outside those channels returns an ephemeral error that mentions each allowed channel by mention (e.g. ❌ Este comando solo se puede usar en el canal de vinculación: #verificacion).
Behavior
- Feature & channel guard — checked before any API call.
- API key validation — if
FACEIT_API_KEYis absent or starts withTU_, the command fails immediately with a clear admin-facing error. - Player lookup — calls
fetchFaceitPlayer(nickname)against the Faceit Data API v4. ThrowsPLAYER_NOT_FOUNDif the nickname does not exist. - Duplicate detection — calls
db.getDiscordIdByFaceitId(). If the Faceit account is already linked to this Discord user, a friendlyℹ️notice is returned. If it is linked to another Discord user, the command fails with an error to prevent hijacking. - Level extraction — reads
player.games.cs2.faceit_elo(falls back tocsgo). If no active game level is found, the command aborts. - Persistence — calls
db.linkAccounts(discordId, player_id, nickname, skillLevel, elo, guildId)and populatesplayerCacheusing the composite key${guildId}_${discordId}. - Role sync — if the
autoRoleSyncfeature flag is active for the guild, callssyncMemberLevelRole(guild, discordId, skillLevel)to apply the correct level role immediately. - Audit log — a
successlog entry is added viadb.addLogEntry().
Response
The bot sends two messages on success:-
An ephemeral reply to the caller:
-
A public notification sent to the link channel (fetched via
guild.channels.fetch(linkChannelId)):
The public notification is best-effort — if the bot cannot fetch the channel (e.g. missing
View Channel permission), it silently skips it without failing the command.Error Reference
| Condition | Error message |
|---|---|
command_verificar flag is false | ❌ Este comando está desactivado por el administrador. |
| Link channel not configured | ❌ El canal de vinculación no está configurado por el administrador. |
| Command run outside allowed channel | ❌ Este comando solo se puede usar en el canal de vinculación: #channel. |
FACEIT_API_KEY missing/placeholder | ❌ El administrador no ha configurado la API Key de Faceit. |
| Nickname not found on Faceit | ❌ No se encontró ningún jugador con el nickname **X** en Faceit. |
| Faceit account already linked to another user | ❌ La cuenta de Faceit **X** ya está vinculada al usuario de Discord @User. |
| No active CS2/CS:GO level on profile | ❌ No se encontró nivel de CS2/CS:GO activo para tu perfil. |